Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@
import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataResp;
import org.apache.iotdb.service.rpc.thrift.TSIService;
import org.apache.thrift.TException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class IoTDBDatabaseMetadata implements DatabaseMetaData {

private static final Logger LOGGER = LoggerFactory
.getLogger(IoTDBDatabaseMetadata.class);

private IoTDBConnection connection;
private TSIService.Iface client;

Expand Down Expand Up @@ -1186,7 +1191,12 @@ public boolean usesLocalFiles() throws SQLException {
throw new SQLException("Method not supported");
}

/*




/**
* @deprecated
* recommend using getMetadataInJson() instead of toString()
*/
@Deprecated
Expand All @@ -1195,23 +1205,22 @@ public String toString() {
try {
return getMetadataInJsonFunc();
} catch (IoTDBSQLException e) {
System.out.println("Failed to fetch metadata in json because: " + e);
LOGGER.info("Failed to fetch metadata in json because: ", e);
} catch (TException e) {
boolean flag = connection.reconnect();
this.client = connection.client;
if (flag) {
try {
return getMetadataInJsonFunc();
} catch (TException e2) {
System.out.println(
"Fail to get all timeseries " + "info after reconnecting."
+ " please check server status");
LOGGER.info("Fail to get all timeseries " + "info after reconnecting."
+ " please check server status", e2);
} catch (IoTDBSQLException e1) {
// ignored
}
} else {
System.out.println("Fail to reconnect to server "
+ "when getting all timeseries info. please check server status");
LOGGER.info("Fail to reconnect to server "
+ "when getting all timeseries info. please check server status");
}
}
return null;
Expand Down
4 changes: 2 additions & 2 deletions jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class IoTDBDriver implements Driver {
private final String TSFILE_URL_PREFIX = Config.IOTDB_URL_PREFIX + ".*";

public IoTDBDriver() {

// This is a constructor.
}

@Override
Expand Down Expand Up @@ -89,7 +89,7 @@ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
@Override
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException {
// TODO Auto-generated method stub
return null;
return new DriverPropertyInfo[0];
}

@Override
Expand Down
Loading