Skip to content

Commit a9d1401

Browse files
2b3c5112b3c511
and
2b3c511
authored
update import and export tsfile description (#12684)
Co-authored-by: 2b3c511 <[email protected]>
1 parent a178a79 commit a9d1401

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

integration-test/src/test/java/org/apache/iotdb/tools/it/ExportTsFileTestIT.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected void testOnWindows() throws IOException {
9090
"root",
9191
"-pw",
9292
"root",
93-
"-td",
93+
"-t",
9494
"target",
9595
"-q",
9696
"select * from root.test.t2 where time > 1 and time < 1000000000000",
@@ -116,7 +116,7 @@ protected void testOnWindows() throws IOException {
116116
"root",
117117
"-pw",
118118
"root",
119-
"-td",
119+
"-t",
120120
"target",
121121
"-q",
122122
"select * from root.test.t2 where time > 1 and time < 1000000000000",
@@ -143,7 +143,7 @@ protected void testOnUnix() throws IOException {
143143
"root",
144144
"-pw",
145145
"root",
146-
"-td",
146+
"-t",
147147
"target",
148148
"-q",
149149
"select * from root.**");
@@ -166,7 +166,7 @@ protected void testOnUnix() throws IOException {
166166
"root",
167167
"-pw",
168168
"root",
169-
"-td",
169+
"-t",
170170
"target",
171171
"-q",
172172
"select * from root.**");

iotdb-client/cli/src/main/java/org/apache/iotdb/tool/AbstractTsFileTool.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public abstract class AbstractTsFileTool {
4242
protected static final String USERNAME_ARGS = "u";
4343
protected static final String USERNAME_NAME = "username";
4444

45-
protected static final String TIMEOUT_ARGS = "t";
46-
protected static final String TIMEOUT_NAME = "timeout";
45+
protected static final String TIMEOUT_ARGS = "timeout";
46+
protected static final String TIMEOUT_NAME = "queryTimeout";
4747
protected static final int MAX_HELP_CONSOLE_WIDTH = 92;
4848
protected static final int CODE_OK = 0;
4949
protected static final int CODE_ERROR = 1;
@@ -109,7 +109,7 @@ protected static void createBaseOptions() {
109109
.longOpt(HOST_NAME)
110110
.argName(HOST_NAME)
111111
.hasArg()
112-
.desc("Host Name")
112+
.desc("Host Name (optional)")
113113
.build();
114114
options.addOption(opHost);
115115

@@ -118,7 +118,7 @@ protected static void createBaseOptions() {
118118
.longOpt(PORT_NAME)
119119
.argName(PORT_NAME)
120120
.hasArg()
121-
.desc("Port")
121+
.desc("Port (optional)")
122122
.build();
123123
options.addOption(opPort);
124124

@@ -127,7 +127,7 @@ protected static void createBaseOptions() {
127127
.longOpt(USERNAME_NAME)
128128
.argName(USERNAME_NAME)
129129
.hasArg()
130-
.desc("Username")
130+
.desc("Username (optional)")
131131
.build();
132132
options.addOption(opUsername);
133133

@@ -137,7 +137,7 @@ protected static void createBaseOptions() {
137137
.optionalArg(true)
138138
.argName(PW_NAME)
139139
.hasArg()
140-
.desc("Password")
140+
.desc("Password (optional)")
141141
.build();
142142
options.addOption(opPassword);
143143
}

iotdb-client/cli/src/main/java/org/apache/iotdb/tool/ExportTsFile.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@
6161

6262
public class ExportTsFile extends AbstractTsFileTool {
6363

64-
private static final String TARGET_DIR_ARGS = "td";
64+
private static final String TARGET_DIR_ARGS = "t";
6565
private static final String TARGET_DIR_NAME = "targetDirectory";
66-
private static final String TARGET_FILE_ARGS = "f";
67-
private static final String TARGET_FILE_NAME = "targetFile";
66+
private static final String TARGET_FILE_ARGS = "tfn";
67+
private static final String TARGET_FILE_NAME = "targetFileName";
6868

6969
private static final String SQL_FILE_ARGS = "s";
70-
private static final String SQL_FILE_NAME = "sqlfile";
70+
private static final String SQL_FILE_NAME = "sourceSqlFile";
7171
private static final String QUERY_COMMAND_ARGS = "q";
7272
private static final String QUERY_COMMAND_NAME = "queryCommand";
7373
private static final String DUMP_FILE_NAME_DEFAULT = "dump";
@@ -265,7 +265,7 @@ private static void createOptions() {
265265

266266
Option opTimeout =
267267
Option.builder(TIMEOUT_ARGS)
268-
.longOpt(TIMEOUT_NAME)
268+
.argName(TIMEOUT_NAME)
269269
.hasArg()
270270
.desc("Timeout for session query")
271271
.build();

0 commit comments

Comments
 (0)