bvaradar commented on a change in pull request #600:  Timeline Service with 
Incremental View Syncing support
URL: https://github.com/apache/incubator-hudi/pull/600#discussion_r275558301
 
 

 ##########
 File path: 
hoodie-client/src/main/java/com/uber/hoodie/func/EmbeddedTimelineServer.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ *  Copyright (c) 2018 Uber Technologies, Inc. ([email protected])
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *           http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.uber.hoodie.func;
+
+import com.uber.hoodie.common.SerializableConfiguration;
+import com.uber.hoodie.common.model.HoodieRecordPayload;
+import com.uber.hoodie.common.table.view.FileSystemViewManager;
+import com.uber.hoodie.common.table.view.FileSystemViewStorageConfig;
+import com.uber.hoodie.common.table.view.FileSystemViewStorageType;
+import com.uber.hoodie.common.util.NetworkUtils;
+import com.uber.hoodie.common.util.collection.Pair;
+import com.uber.hoodie.config.HoodieWriteConfig;
+import com.uber.hoodie.timeline.TimelineServer;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ForkJoinPool;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.SparkConf;
+import org.apache.spark.api.java.JavaSparkContext;
+
+/**
+ * Timeline Service that runs in Driver
+ */
+public class EmbeddedTimelineServer {
+
+  private static Logger logger = 
LogManager.getLogger(EmbeddedTimelineServer.class);
+
+  private final int serverPort;
+  private String hostAddr;
+  private final SerializableConfiguration hadoopConf;
+  private final HoodieWriteConfig config;
+  private transient FileSystemViewManager viewManager;
+  private transient TimelineServer server;
+
+  public EmbeddedTimelineServer(Configuration hadoopConf, HoodieWriteConfig 
config) {
+    Pair<String, Integer> hostPort = 
NetworkUtils.getAvailableServerPortWithHostname();
+    this.hostAddr = hostPort.getKey();
+    this.serverPort = hostPort.getRight();
+    this.config = config;
+    this.hadoopConf = new SerializableConfiguration(hadoopConf);
+    this.viewManager = createViewManager();
+  }
+
+  public <T extends HoodieRecordPayload> boolean 
preloadNeededPartitions(JavaSparkContext jsc,
 
 Review comment:
   This method is now removed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to