类 AbstractClient
- java.lang.Object
-
- org.apache.iotdb.cli.client.AbstractClient
-
-
字段概要
字段 修饰符和类型 字段 说明 protected static java.util.List<java.lang.String>AGGREGRATE_TIME_LISTprotected static java.lang.StringEXIT_COMMANDprotected static intfetchSizeprotected static java.lang.StringformatTimeprotected static java.lang.StringformatValueprotected static java.lang.StringHELPprotected static java.lang.StringHELP_ARGSprotected static java.lang.Stringhostprotected static java.lang.StringHOST_ARGSprotected static java.lang.StringHOST_NAMEprotected static java.lang.StringIMPORT_CMDprotected static java.lang.StringIOTDB_CLI_PREFIXprotected static intISO_DATETIME_LENprotected static java.lang.StringISO8601_ARGSprotected static booleanisQuitprotected static java.util.Set<java.lang.String>keywordSetprotected static intMAX_HELP_CONSOLE_WIDTHprotected static java.lang.StringMAX_PRINT_ROW_COUNT_ARGSprotected static java.lang.StringMAX_PRINT_ROW_COUNT_NAMEprotected static intmaxPrintRowCountprotected static intmaxTimeLengthprotected static intmaxValueLengthprotected static int[]maxValueLengthForShowcontrol the width of columns for 'show timeseries path' and 'show storage group'.protected static java.lang.Stringpasswordprotected static java.lang.StringPASSWORD_ARGSprotected static java.lang.StringPASSWORD_NAMEprotected static java.lang.Stringportprotected static java.lang.StringPORT_ARGSprotected static java.lang.StringPORT_NAMEprotected static booleanprintToConsoleprotected static org.apache.iotdb.service.rpc.thrift.ServerPropertiespropertiesprotected static java.lang.StringQUIT_COMMANDprotected static java.lang.StringSCRIPT_HINTprotected static java.lang.StringSET_FETCH_SIZEprotected static java.lang.StringSET_MAX_DISPLAY_NUMprotected static java.lang.StringSET_TIME_ZONEprotected static java.lang.StringSET_TIMESTAMP_DISPLAYprotected static java.lang.StringSHOW_FETCH_SIZEprotected static java.lang.StringSHOW_METADATA_COMMANDprotected static java.lang.StringSHOW_TIMESTAMP_DISPLAYprotected static java.lang.StringSHOW_TIMEZONEprotected static java.lang.StringtimeFormatprotected static java.lang.StringTIMESTAMP_STRprotected static java.lang.Stringusernameprotected static java.lang.StringUSERNAME_ARGSprotected static java.lang.StringUSERNAME_NAME
-
构造器概要
构造器 构造器 说明 AbstractClient()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 protected static java.lang.StringcheckRequiredArg(java.lang.String arg, java.lang.String name, org.apache.commons.cli.CommandLine commandLine, boolean isRequired, java.lang.String defaultValue)protected static org.apache.commons.cli.OptionscreateOptions()protected static voiddisplayLogo(java.lang.String version)protected static voidexecuteQuery(org.apache.iotdb.jdbc.IoTDBConnection connection, java.lang.String cmd)protected static voidhandleException(java.lang.Exception e)protected static org.apache.iotdb.cli.client.AbstractClient.OperationResulthandleInputCmd(java.lang.String cmd, org.apache.iotdb.jdbc.IoTDBConnection connection)protected static voidimportCmd(java.lang.String specialCmd, java.lang.String cmd, org.apache.iotdb.jdbc.IoTDBConnection connection)protected static voidinit()static voidoutput(java.sql.ResultSet res, boolean printToConsole, java.time.ZoneId zoneId)CLI result output.protected static voidprint(java.lang.String msg)protected static voidprintBlockLine(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShowTs)protected static voidprintColumnData(java.sql.ResultSetMetaData resultSetMetaData, java.sql.ResultSet res, int i, java.time.ZoneId zoneId)protected static voidprintCount(boolean isShow, java.sql.ResultSet res, int cnt)protected static voidprintf(java.lang.String format, java.lang.Object... args)protected static voidprintHeader(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShow)protected static voidprintln()protected static voidprintln(java.lang.Object obj)protected static voidprintln(java.lang.String msg)protected static voidprintName(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShowTs)protected static voidprintRow(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShow, java.sql.ResultSet res, java.time.ZoneId zoneId)protected static voidprintRowData(boolean printTimestamp, java.sql.ResultSet res, java.time.ZoneId zoneId, java.sql.ResultSetMetaData resultSetMetaData, int colCount)protected static voidprintShow(int colCount, java.sql.ResultSet res)protected static java.lang.String[]removePasswordArgs(java.lang.String[] args)protected static voidsetFetchSize(java.lang.String specialCmd, java.lang.String cmd)protected static voidsetMaxDisplaNum(java.lang.String specialCmd, java.lang.String cmd)protected static voidsetMaxDisplayNumber(java.lang.String maxDisplayNum)protected static voidsetTimeFormat(java.lang.String newTimeFormat)protected static voidsetTimestampDisplay(java.lang.String specialCmd, java.lang.String cmd)protected static voidsetTimeZone(java.lang.String specialCmd, java.lang.String cmd, org.apache.iotdb.jdbc.IoTDBConnection connection)protected static voidshowHelp()protected static voidshowMetaData(org.apache.iotdb.jdbc.IoTDBConnection connection)protected static voidshowTimeZone(org.apache.iotdb.jdbc.IoTDBConnection connection)
-
-
-
字段详细资料
-
HOST_ARGS
protected static final java.lang.String HOST_ARGS
- 另请参阅:
- 常量字段值
-
HOST_NAME
protected static final java.lang.String HOST_NAME
- 另请参阅:
- 常量字段值
-
HELP_ARGS
protected static final java.lang.String HELP_ARGS
- 另请参阅:
- 常量字段值
-
PORT_ARGS
protected static final java.lang.String PORT_ARGS
- 另请参阅:
- 常量字段值
-
PORT_NAME
protected static final java.lang.String PORT_NAME
- 另请参阅:
- 常量字段值
-
PASSWORD_ARGS
protected static final java.lang.String PASSWORD_ARGS
- 另请参阅:
- 常量字段值
-
PASSWORD_NAME
protected static final java.lang.String PASSWORD_NAME
- 另请参阅:
- 常量字段值
-
USERNAME_ARGS
protected static final java.lang.String USERNAME_ARGS
- 另请参阅:
- 常量字段值
-
USERNAME_NAME
protected static final java.lang.String USERNAME_NAME
- 另请参阅:
- 常量字段值
-
ISO8601_ARGS
protected static final java.lang.String ISO8601_ARGS
- 另请参阅:
- 常量字段值
-
AGGREGRATE_TIME_LIST
protected static final java.util.List<java.lang.String> AGGREGRATE_TIME_LIST
-
MAX_PRINT_ROW_COUNT_ARGS
protected static final java.lang.String MAX_PRINT_ROW_COUNT_ARGS
- 另请参阅:
- 常量字段值
-
MAX_PRINT_ROW_COUNT_NAME
protected static final java.lang.String MAX_PRINT_ROW_COUNT_NAME
- 另请参阅:
- 常量字段值
-
SET_MAX_DISPLAY_NUM
protected static final java.lang.String SET_MAX_DISPLAY_NUM
- 另请参阅:
- 常量字段值
-
SET_TIMESTAMP_DISPLAY
protected static final java.lang.String SET_TIMESTAMP_DISPLAY
- 另请参阅:
- 常量字段值
-
SHOW_TIMESTAMP_DISPLAY
protected static final java.lang.String SHOW_TIMESTAMP_DISPLAY
- 另请参阅:
- 常量字段值
-
SET_TIME_ZONE
protected static final java.lang.String SET_TIME_ZONE
- 另请参阅:
- 常量字段值
-
SHOW_TIMEZONE
protected static final java.lang.String SHOW_TIMEZONE
- 另请参阅:
- 常量字段值
-
SET_FETCH_SIZE
protected static final java.lang.String SET_FETCH_SIZE
- 另请参阅:
- 常量字段值
-
SHOW_FETCH_SIZE
protected static final java.lang.String SHOW_FETCH_SIZE
- 另请参阅:
- 常量字段值
-
HELP
protected static final java.lang.String HELP
- 另请参阅:
- 常量字段值
-
IOTDB_CLI_PREFIX
protected static final java.lang.String IOTDB_CLI_PREFIX
- 另请参阅:
- 常量字段值
-
SCRIPT_HINT
protected static final java.lang.String SCRIPT_HINT
- 另请参阅:
- 常量字段值
-
QUIT_COMMAND
protected static final java.lang.String QUIT_COMMAND
- 另请参阅:
- 常量字段值
-
EXIT_COMMAND
protected static final java.lang.String EXIT_COMMAND
- 另请参阅:
- 常量字段值
-
SHOW_METADATA_COMMAND
protected static final java.lang.String SHOW_METADATA_COMMAND
- 另请参阅:
- 常量字段值
-
MAX_HELP_CONSOLE_WIDTH
protected static final int MAX_HELP_CONSOLE_WIDTH
- 另请参阅:
- 常量字段值
-
TIMESTAMP_STR
protected static final java.lang.String TIMESTAMP_STR
- 另请参阅:
- 常量字段值
-
ISO_DATETIME_LEN
protected static final int ISO_DATETIME_LEN
- 另请参阅:
- 常量字段值
-
IMPORT_CMD
protected static final java.lang.String IMPORT_CMD
- 另请参阅:
- 常量字段值
-
timeFormat
protected static java.lang.String timeFormat
-
maxPrintRowCount
protected static int maxPrintRowCount
-
fetchSize
protected static int fetchSize
-
maxTimeLength
protected static int maxTimeLength
-
maxValueLength
protected static int maxValueLength
-
isQuit
protected static boolean isQuit
-
maxValueLengthForShow
protected static int[] maxValueLengthForShow
control the width of columns for 'show timeseries path' and 'show storage group'.for 'show timeseries path':
Timeseries (width:75) Storage Group (width:45) DataType width:8) Encoding (width:8) root.vehicle.d1.s1 root.vehicle INT32 PLAIN ... ... ... ... for "show storage group path":
STORAGE_GROUP (width:75) root.vehicle ...
-
formatTime
protected static java.lang.String formatTime
-
formatValue
protected static java.lang.String formatValue
-
host
protected static java.lang.String host
-
port
protected static java.lang.String port
-
username
protected static java.lang.String username
-
password
protected static java.lang.String password
-
printToConsole
protected static boolean printToConsole
-
keywordSet
protected static java.util.Set<java.lang.String> keywordSet
-
properties
protected static org.apache.iotdb.service.rpc.thrift.ServerProperties properties
-
-
方法详细资料
-
init
protected static void init()
-
output
public static void output(java.sql.ResultSet res, boolean printToConsole, java.time.ZoneId zoneId) throws java.sql.SQLExceptionCLI result output.- 参数:
res- result setprintToConsole- print to consolezoneId- time-zone ID- 抛出:
java.sql.SQLException- SQLException
-
printCount
protected static void printCount(boolean isShow, java.sql.ResultSet res, int cnt) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
printRow
protected static void printRow(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShow, java.sql.ResultSet res, java.time.ZoneId zoneId) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
printHeader
protected static void printHeader(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShow) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
printShow
protected static void printShow(int colCount, java.sql.ResultSet res) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
printRowData
protected static void printRowData(boolean printTimestamp, java.sql.ResultSet res, java.time.ZoneId zoneId, java.sql.ResultSetMetaData resultSetMetaData, int colCount) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
printColumnData
protected static void printColumnData(java.sql.ResultSetMetaData resultSetMetaData, java.sql.ResultSet res, int i, java.time.ZoneId zoneId) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
createOptions
protected static org.apache.commons.cli.Options createOptions()
-
checkRequiredArg
protected static java.lang.String checkRequiredArg(java.lang.String arg, java.lang.String name, org.apache.commons.cli.CommandLine commandLine, boolean isRequired, java.lang.String defaultValue) throws ArgsErrorException
-
setTimeFormat
protected static void setTimeFormat(java.lang.String newTimeFormat)
-
setMaxDisplayNumber
protected static void setMaxDisplayNumber(java.lang.String maxDisplayNum)
-
printBlockLine
protected static void printBlockLine(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShowTs) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
printName
protected static void printName(boolean printTimestamp, int colCount, java.sql.ResultSetMetaData resultSetMetaData, boolean isShowTs) throws java.sql.SQLException- 抛出:
java.sql.SQLException
-
removePasswordArgs
protected static java.lang.String[] removePasswordArgs(java.lang.String[] args)
-
displayLogo
protected static void displayLogo(java.lang.String version)
-
handleInputCmd
protected static org.apache.iotdb.cli.client.AbstractClient.OperationResult handleInputCmd(java.lang.String cmd, org.apache.iotdb.jdbc.IoTDBConnection connection)
-
showHelp
protected static void showHelp()
-
showMetaData
protected static void showMetaData(org.apache.iotdb.jdbc.IoTDBConnection connection)
-
setTimestampDisplay
protected static void setTimestampDisplay(java.lang.String specialCmd, java.lang.String cmd)
-
setTimeZone
protected static void setTimeZone(java.lang.String specialCmd, java.lang.String cmd, org.apache.iotdb.jdbc.IoTDBConnection connection)
-
setFetchSize
protected static void setFetchSize(java.lang.String specialCmd, java.lang.String cmd)
-
setMaxDisplaNum
protected static void setMaxDisplaNum(java.lang.String specialCmd, java.lang.String cmd)
-
showTimeZone
protected static void showTimeZone(org.apache.iotdb.jdbc.IoTDBConnection connection)
-
importCmd
protected static void importCmd(java.lang.String specialCmd, java.lang.String cmd, org.apache.iotdb.jdbc.IoTDBConnection connection)
-
executeQuery
protected static void executeQuery(org.apache.iotdb.jdbc.IoTDBConnection connection, java.lang.String cmd)
-
printf
protected static void printf(java.lang.String format, java.lang.Object... args)
-
print
protected static void print(java.lang.String msg)
-
println
protected static void println()
-
println
protected static void println(java.lang.String msg)
-
println
protected static void println(java.lang.Object obj)
-
handleException
protected static void handleException(java.lang.Exception e)
-
-