|
@@ -17,14 +17,18 @@
|
|
|
|
|
|
package org.apache.hadoop.yarn.server.timelineservice.storage.common;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.net.MalformedURLException;
|
|
|
import java.net.URL;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
import org.apache.hadoop.hbase.Cell;
|
|
|
import org.apache.hadoop.hbase.CellUtil;
|
|
|
import org.apache.hadoop.hbase.HBaseConfiguration;
|
|
|
import org.apache.hadoop.hbase.HConstants;
|
|
|
-import org.apache.hadoop.hbase.HRegionInfo;
|
|
|
import org.apache.hadoop.hbase.KeyValue;
|
|
|
import org.apache.hadoop.hbase.Tag;
|
|
|
import org.apache.hadoop.hbase.util.Bytes;
|
|
@@ -33,15 +37,10 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.flow.AggregationCompactionDimension;
|
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.flow.AggregationOperation;
|
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute;
|
|
|
-import org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunTable;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
-import java.io.IOException;
|
|
|
import java.text.NumberFormat;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* A bunch of utility functions used in HBase TimelineService backend.
|
|
@@ -274,16 +273,17 @@ public final class HBaseTimelineStorageUtils {
|
|
|
*/
|
|
|
public static Configuration getTimelineServiceHBaseConf(Configuration conf)
|
|
|
throws MalformedURLException {
|
|
|
- Configuration hbaseConf;
|
|
|
-
|
|
|
if (conf == null) {
|
|
|
- return HBaseConfiguration.create();
|
|
|
+ throw new NullPointerException();
|
|
|
}
|
|
|
|
|
|
+ Configuration hbaseConf;
|
|
|
String timelineServiceHBaseConfFileURL =
|
|
|
conf.get(YarnConfiguration.TIMELINE_SERVICE_HBASE_CONFIGURATION_FILE);
|
|
|
if (timelineServiceHBaseConfFileURL != null
|
|
|
&& timelineServiceHBaseConfFileURL.length() > 0) {
|
|
|
+ LOG.info("Using hbase configuration at " +
|
|
|
+ timelineServiceHBaseConfFileURL);
|
|
|
// create a clone so that we don't mess with out input one
|
|
|
hbaseConf = new Configuration(conf);
|
|
|
Configuration plainHBaseConf = new Configuration(false);
|