klcopp commented on a change in pull request #2607:
URL: https://github.com/apache/hive/pull/2607#discussion_r697415476
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/metrics/DeltaFilesMetricReporter.java
##########
@@ -240,19 +245,24 @@ public static void mergeDeltaFilesStats(AcidDirectory
dir, long checkThresholdIn
String path = getRelPath(dir);
- filterAndAddToDeltaFilesStats(NUM_DELTAS, numDeltas, deltasThreshold,
deltaFilesStats, path, maxCacheSize);
+ String serializedMetadata =
conf.get(JOB_CONF_DELTA_FILES_METRICS_METADATA);
+ HashMap<Path, DeltaFilesMetadata> pathToMetadata = new HashMap<>();
+ pathToMetadata =
SerializationUtilities.deserializeObject(serializedMetadata,
pathToMetadata.getClass());
Review comment:
deserializeObject could return null
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HiveSplitGenerator.java
##########
@@ -224,6 +228,24 @@ private void prepare(InputInitializerContext
initializerContext) throws IOExcept
}
+ HashMap<Path, DeltaFilesMetricReporter.DeltaFilesMetadata>
deltaFilesMetadata = new HashMap();
+
+ work.getPathToPartitionInfo().entrySet().forEach(e -> {
+ DeltaFilesMetricReporter.DeltaFilesMetadata metadata = new
DeltaFilesMetricReporter.DeltaFilesMetadata();
+ TableDesc tableDesc = e.getValue().getTableDesc();
+ metadata.dbName = tableDesc.getDbName();
+ metadata.tableName = tableDesc.getTableName();
+ LinkedHashMap<String, String> partSpec = e.getValue().getPartSpec();
+ if (partSpec != null && !partSpec.isEmpty()) {
+ metadata.partitionName = String.valueOf(partSpec);
+ }
+ deltaFilesMetadata.put(e.getKey(), metadata);
+ });
+
+ String serializedMetadata =
SerializationUtilities.serializeObject(deltaFilesMetadata);
Review comment:
serializeObject could return null?
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/metrics/DeltaFilesMetricReporter.java
##########
@@ -240,19 +245,24 @@ public static void mergeDeltaFilesStats(AcidDirectory
dir, long checkThresholdIn
String path = getRelPath(dir);
Review comment:
path isn't used
--
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]