KiranVelumuri commented on code in PR #5036:
URL: https://github.com/apache/hive/pull/5036#discussion_r1555238702
##########
beeline/src/java/org/apache/hive/beeline/schematool/HiveSchemaTool.java:
##########
@@ -112,6 +121,40 @@ protected void execSql(String sqlScriptFile) throws
IOException {
}
}
+ void replaceLocationForProtoLogTables(String sqlScriptFile) throws
IOException {
+ TezConfiguration tezConf = new TezConfiguration(true);
+ String hiveProtoBaseDir = HiveConf.getVar(conf,
HiveConf.ConfVars.HIVE_PROTO_EVENTS_BASE_PATH);
+ String tezProtoBaseDir =
tezConf.get(TezConfiguration.TEZ_HISTORY_LOGGING_PROTO_BASE_DIR);
+
+ if (isEmpty(hiveProtoBaseDir)) {
+ throw new IOException("Hive conf variable hive.hook.proto.base-directory
is not set for creating protologging tables");
+ }
+ if (isEmpty(tezProtoBaseDir)) {
+ throw new IOException("Tez conf variable
tez.history.logging.proto-base-dir is not set for creating protologging
tables");
+ }
+
+ Map<String, String> replacements = new HashMap<>();
+ replacements.put("_REPLACE_WITH_QUERY_DATA_LOCATION_", "hdfs:///" +
hiveProtoBaseDir);
Review Comment:
Sorry for the late update as I was away due to personal issues. I have
updated the files by working on your suggestions.
##########
beeline/src/java/org/apache/hive/beeline/schematool/HiveSchemaTool.java:
##########
@@ -112,6 +121,40 @@ protected void execSql(String sqlScriptFile) throws
IOException {
}
}
+ void replaceLocationForProtoLogTables(String sqlScriptFile) throws
IOException {
+ TezConfiguration tezConf = new TezConfiguration(true);
+ String hiveProtoBaseDir = HiveConf.getVar(conf,
HiveConf.ConfVars.HIVE_PROTO_EVENTS_BASE_PATH);
+ String tezProtoBaseDir =
tezConf.get(TezConfiguration.TEZ_HISTORY_LOGGING_PROTO_BASE_DIR);
+
+ if (isEmpty(hiveProtoBaseDir)) {
+ throw new IOException("Hive conf variable hive.hook.proto.base-directory
is not set for creating protologging tables");
+ }
+ if (isEmpty(tezProtoBaseDir)) {
+ throw new IOException("Tez conf variable
tez.history.logging.proto-base-dir is not set for creating protologging
tables");
+ }
+
+ Map<String, String> replacements = new HashMap<>();
+ replacements.put("_REPLACE_WITH_QUERY_DATA_LOCATION_", "hdfs:///" +
hiveProtoBaseDir);
+ replacements.put("_REPLACE_WITH_APP_DATA_LOCATION_", "hdfs:///" +
tezProtoBaseDir + "/app_data");
+ replacements.put("_REPLACE_WITH_DAG_DATA_LOCATION_", "hdfs:///" +
tezProtoBaseDir + "/dag_data");
+ replacements.put("_REPLACE_WITH_DAG_META_LOCATION_", "hdfs:///" +
tezProtoBaseDir + "/dag_meta");
Review Comment:
Sorry for the late update as I was away due to personal issues. I have
updated the files by working on your suggestions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]