gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [gora] madhawa-gunasekara commented on a change in pull request #175: GORA-546 Hazelcast Jet execution engine support
Date Sun, 15 Mar 2020 00:17:08 GMT
madhawa-gunasekara commented on a change in pull request #175: GORA-546 Hazelcast Jet execution
engine support
URL: https://github.com/apache/gora/pull/175#discussion_r306876547
 
 

 ##########
 File path: gora-jet/src/test/java/org/apache/gora/jet/JetTest.java
 ##########
 @@ -0,0 +1,152 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.gora.jet;
+
+import com.hazelcast.core.IMap;
+import com.hazelcast.jet.Jet;
+import com.hazelcast.jet.JetInstance;
+import com.hazelcast.jet.pipeline.BatchSource;
+import com.hazelcast.jet.pipeline.Pipeline;
+import com.hazelcast.jet.pipeline.Sinks;
+import org.apache.gora.jet.generated.Pageview;
+import org.apache.gora.jet.generated.ResultPageView;
+import org.apache.gora.query.Query;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.apache.hadoop.conf.Configuration;
+import org.junit.Test;
+
+import java.util.regex.Pattern;
+
+import static com.hazelcast.jet.Traversers.traverseArray;
+import static com.hazelcast.jet.aggregate.AggregateOperations.counting;
+import static com.hazelcast.jet.function.Functions.wholeItem;
+
+/**
+ * Test case for jet sink and source connectors.
+ */
+public class JetTest {
+
+  private static DataStore<Long, Pageview> dataStore;
+  private static DataStore<Long, ResultPageView> dataStoreOut;
+  static Query<Long, Pageview> query = null;
+
+  @Test
+  public void testNewJetSource() {
+
+    Configuration conf =  new Configuration();
+
+    try {
+      dataStore = DataStoreFactory.getDataStore(Long.class, Pageview.class, conf);
+    } catch (GoraException e) {
+      e.printStackTrace();
 
 Review comment:
   Remove printstacktraces

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message