mirror of https://github.com/apache/iotdb
update thrift related
This commit is contained in:
parent
88f22e9ee6
commit
8cd03b8632
2
pom.xml
2
pom.xml
|
@ -23,7 +23,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.edu.tsinghua</groupId>
|
<groupId>cn.edu.tsinghua</groupId>
|
||||||
<artifactId>iotdb-jdbc</artifactId>
|
<artifactId>iotdb-jdbc</artifactId>
|
||||||
<version>0.1.1</version>
|
<version>0.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
|
|
@ -12,11 +12,11 @@ import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import cn.edu.thu.tsfiledb.metadata.ColumnSchema;
|
import cn.edu.thu.tsfiledb.metadata.ColumnSchema;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSColumnSchema;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSColumnSchema;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSDynamicOneColumnData;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSDynamicOneColumnData;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSQueryDataSet;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSQueryDataSet;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TS_Status;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TS_Status;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TS_StatusCode;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TS_StatusCode;
|
||||||
import cn.edu.tsinghua.iotdb.jdbc.TsfileConnectionParams;
|
import cn.edu.tsinghua.iotdb.jdbc.TsfileConnectionParams;
|
||||||
import cn.edu.tsinghua.iotdb.jdbc.TsfileJDBCConfig;
|
import cn.edu.tsinghua.iotdb.jdbc.TsfileJDBCConfig;
|
||||||
import cn.edu.tsinghua.iotdb.jdbc.TsfileSQLException;
|
import cn.edu.tsinghua.iotdb.jdbc.TsfileSQLException;
|
||||||
|
|
|
@ -15,8 +15,8 @@ import org.slf4j.LoggerFactory;
|
||||||
import cn.edu.thu.tsfiledb.conf.TsFileDBConstant;
|
import cn.edu.thu.tsfiledb.conf.TsFileDBConstant;
|
||||||
import cn.edu.thu.tsfiledb.conf.TsfileDBConfig;
|
import cn.edu.thu.tsfiledb.conf.TsfileDBConfig;
|
||||||
import cn.edu.thu.tsfiledb.conf.TsfileDBDescriptor;
|
import cn.edu.thu.tsfiledb.conf.TsfileDBDescriptor;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSIService;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSIService;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSIService.Processor;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSIService.Processor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A server to handle jdbc request from client.
|
* A server to handle jdbc request from client.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.*;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.*;
|
||||||
import org.apache.thrift.TException;
|
import org.apache.thrift.TException;
|
||||||
import org.apache.thrift.server.ServerContext;
|
import org.apache.thrift.server.ServerContext;
|
||||||
import org.joda.time.DateTimeZone;
|
import org.joda.time.DateTimeZone;
|
||||||
|
|
|
@ -7,9 +7,9 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import cn.edu.thu.tsfiledb.metadata.ColumnSchema;
|
import cn.edu.thu.tsfiledb.metadata.ColumnSchema;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSColumnSchema;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSColumnSchema;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSDynamicOneColumnData;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSDynamicOneColumnData;
|
||||||
import cn.edu.thu.tsfiledb.service.rpc.thrift.TSQueryDataSet;
|
import cn.edu.tsinghua.iotdb.jdbc.thrift.TSQueryDataSet;
|
||||||
import cn.edu.tsinghua.tsfile.common.exception.UnSupportedDataTypeException;
|
import cn.edu.tsinghua.tsfile.common.exception.UnSupportedDataTypeException;
|
||||||
import cn.edu.tsinghua.tsfile.timeseries.read.query.DynamicOneColumnData;
|
import cn.edu.tsinghua.tsfile.timeseries.read.query.DynamicOneColumnData;
|
||||||
import cn.edu.tsinghua.tsfile.timeseries.read.query.QueryDataSet;
|
import cn.edu.tsinghua.tsfile.timeseries.read.query.QueryDataSet;
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class ExportCsv extends AbstractCsvTool{
|
||||||
parseSpecialParams(commandLine, reader);
|
parseSpecialParams(commandLine, reader);
|
||||||
if(!checkTimeFormat()){
|
if(!checkTimeFormat()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Class.forName(TsfileJDBCConfig.JDBC_DRIVER_NAME);
|
Class.forName(TsfileJDBCConfig.JDBC_DRIVER_NAME);
|
||||||
|
|
||||||
String sqlFile = commandLine.getOptionValue(SQL_FILE_ARGS);
|
String sqlFile = commandLine.getOptionValue(SQL_FILE_ARGS);
|
||||||
|
|
|
@ -320,19 +320,12 @@ public class ImportCsv extends AbstractCsvTool{
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(String.format("[ERROR] Encounter an error, because %s", e.getMessage()));
|
System.out.println(String.format("[ERROR] Encounter an error, because %s", e.getMessage()));
|
||||||
} finally {
|
} finally {
|
||||||
if(reader != null){
|
reader.close();
|
||||||
reader.close();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void parseSpecialParams(CommandLine commandLine, ConsoleReader reader) throws IOException, ArgsErrorException {
|
private static void parseSpecialParams(CommandLine commandLine, ConsoleReader reader) throws IOException, ArgsErrorException {
|
||||||
timeZoneID = commandLine.getOptionValue(TIME_ZONE_ARGS);
|
timeZoneID = commandLine.getOptionValue(TIME_ZONE_ARGS);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void importCsvFromFile(String ip,String port, String username, String password, String filename, String timeZone) throws SQLException{
|
public static void importCsvFromFile(String ip,String port, String username, String password, String filename, String timeZone) throws SQLException{
|
||||||
|
|
Loading…
Reference in New Issue