[MINOR] Optimize variable names and logs (#4581)
This commit is contained in:
@@ -261,23 +261,23 @@ public class HoodieHiveClient extends AbstractSyncHoodieClient {
|
|||||||
public Option<String> getLastCommitTimeSynced(String tableName) {
|
public Option<String> getLastCommitTimeSynced(String tableName) {
|
||||||
// Get the last commit time from the TBLproperties
|
// Get the last commit time from the TBLproperties
|
||||||
try {
|
try {
|
||||||
Table database = client.getTable(syncConfig.databaseName, tableName);
|
Table table = client.getTable(syncConfig.databaseName, tableName);
|
||||||
return Option.ofNullable(database.getParameters().getOrDefault(HOODIE_LAST_COMMIT_TIME_SYNC, null));
|
return Option.ofNullable(table.getParameters().getOrDefault(HOODIE_LAST_COMMIT_TIME_SYNC, null));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new HoodieHiveSyncException("Failed to get the last commit time synced from the database", e);
|
throw new HoodieHiveSyncException("Failed to get the last commit time synced from the table " + tableName, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Option<String> getLastReplicatedTime(String tableName) {
|
public Option<String> getLastReplicatedTime(String tableName) {
|
||||||
// Get the last replicated time from the TBLproperties
|
// Get the last replicated time from the TBLproperties
|
||||||
try {
|
try {
|
||||||
Table database = client.getTable(syncConfig.databaseName, tableName);
|
Table table = client.getTable(syncConfig.databaseName, tableName);
|
||||||
return Option.ofNullable(database.getParameters().getOrDefault(GLOBALLY_CONSISTENT_READ_TIMESTAMP, null));
|
return Option.ofNullable(table.getParameters().getOrDefault(GLOBALLY_CONSISTENT_READ_TIMESTAMP, null));
|
||||||
} catch (NoSuchObjectException e) {
|
} catch (NoSuchObjectException e) {
|
||||||
LOG.warn("the said table not found in hms " + syncConfig.databaseName + "." + tableName);
|
LOG.warn("the said table not found in hms " + syncConfig.databaseName + "." + tableName);
|
||||||
return Option.empty();
|
return Option.empty();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new HoodieHiveSyncException("Failed to get the last replicated time from the database", e);
|
throw new HoodieHiveSyncException("Failed to get the last replicated time from the table " + tableName, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user