flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] lirui-apache commented on a change in pull request #9919: [FLINK-13303][hive]add hive e2e connector test
Date Fri, 18 Oct 2019 10:18:05 GMT
lirui-apache commented on a change in pull request #9919: [FLINK-13303][hive]add hive e2e connector
test 
URL: https://github.com/apache/flink/pull/9919#discussion_r336410631
 
 

 ##########
 File path: flink-end-to-end-tests/flink-hive-test/src/main/java/org/apache/flink/connectors/hive/tests/HiveReadWriteDataExample.java
 ##########
 @@ -0,0 +1,47 @@
+/*
+ * 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.flink.connectors.hive.tests;
+
+import org.apache.flink.table.api.EnvironmentSettings;
+import org.apache.flink.table.api.SqlDialect;
+import org.apache.flink.table.api.TableEnvironment;
+import org.apache.flink.table.api.config.ExecutionConfigOptions;
+import org.apache.flink.table.catalog.hive.HiveCatalog;
+
+/**
+ * End to end test for HiveConnector.
+ */
+public class HiveReadWriteDataExample {
+	public static void main(String[] args) throws Exception {
+		EnvironmentSettings settings = EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build();
+		TableEnvironment tableEnv = TableEnvironment.create(settings);
+		tableEnv.getConfig().getConfiguration().setInteger(ExecutionConfigOptions.TABLE_EXEC_RESOURCE_DEFAULT_PARALLELISM.key(),
1);
+		tableEnv.getConfig().setSqlDialect(SqlDialect.HIVE);
+
+		String catalogName = "hive";
+		String defaultDatabase = "default";
+		String hiveConfDir = "/usr/local/hive/conf";
 
 Review comment:
   I think this should be some public static field, since the path to hive conf dir is actually
decided by the Dockerfile?

----------------------------------------------------------------
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