You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by es...@apache.org on 2017/02/19 23:07:43 UTC
[08/35] incubator-hawq git commit: HAWQ-1319. Add ASF header to java
files and remove jar files in function suite
HAWQ-1319. Add ASF header to java files and remove jar files in function suite
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/d7e6c196
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/d7e6c196
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/d7e6c196
Branch: refs/heads/2.1.0.0-incubating
Commit: d7e6c196fcfb4badd50feab330ad85cf717cb171
Parents: 63c8562
Author: Ruilong Huo <rh...@pivotal.io>
Authored: Fri Feb 10 13:34:21 2017 +0800
Committer: Ruilong Huo <rh...@pivotal.io>
Committed: Fri Feb 10 17:25:10 2017 +0800
----------------------------------------------------------------------
src/test/feature/UDF/TestUDF.cpp | 26 ++++++++++++++++++++++++++
src/test/feature/UDF/lib/function.c | 18 ++++++++++++++++++
src/test/feature/UDF/sql/PLJavaAdd.jar | Bin 654 -> 0 bytes
src/test/feature/UDF/sql/PLJavaAdd.java | 18 ++++++++++++++++++
src/test/feature/UDF/sql/PLJavauAdd.jar | Bin 657 -> 0 bytes
src/test/feature/UDF/sql/PLJavauAdd.java | 18 ++++++++++++++++++
6 files changed, 80 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d7e6c196/src/test/feature/UDF/TestUDF.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/UDF/TestUDF.cpp b/src/test/feature/UDF/TestUDF.cpp
index 95509fb..f79843b 100755
--- a/src/test/feature/UDF/TestUDF.cpp
+++ b/src/test/feature/UDF/TestUDF.cpp
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
#include "gtest/gtest.h"
#include "lib/command.h"
@@ -200,6 +218,10 @@ TEST_F(TestUDF, TestUDFPljava)
// run test if pljava language is enabled
if (util.getQueryResult("SELECT lanname FROM pg_language WHERE lanname = 'java'") == "java")
{
+ // prepare jar files
+ hawq::test::Command cmd("cd " + d_feature_test_root + "/UDF/sql/; javac PLJavaAdd.java; jar cf PLJavaAdd.jar PLJavaAdd.class");
+ cmd.run();
+
// copy jar files over hawq cluster
std::string query = "SELECT string_agg('-h ' || hostname, ' ' ORDER BY hostname) FROM gp_segment_configuration;";
std::string hosts = util.getQueryResult(query);
@@ -230,6 +252,10 @@ TEST_F(TestUDF, TestUDFPljavau)
// run test if pljavau language is enabled
if (util.getQueryResult("SELECT lanname FROM pg_language WHERE lanname = 'javau'") == "javau")
{
+ // prepare jar files
+ hawq::test::Command cmd("cd " + d_feature_test_root + "/UDF/sql/; javac PLJavauAdd.java; jar cf PLJavauAdd.jar PLJavauAdd.class");
+ cmd.run();
+
// copy jar files over hawq cluster
std::string query = "SELECT string_agg('-h ' || hostname, ' ' ORDER BY hostname) FROM gp_segment_configuration;";
std::string hosts = util.getQueryResult(query);
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d7e6c196/src/test/feature/UDF/lib/function.c
----------------------------------------------------------------------
diff --git a/src/test/feature/UDF/lib/function.c b/src/test/feature/UDF/lib/function.c
index d9a842b..b2d4b81 100755
--- a/src/test/feature/UDF/lib/function.c
+++ b/src/test/feature/UDF/lib/function.c
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
#include "postgres.h"
#include "funcapi.h"
#include "tablefuncapi.h"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d7e6c196/src/test/feature/UDF/sql/PLJavaAdd.jar
----------------------------------------------------------------------
diff --git a/src/test/feature/UDF/sql/PLJavaAdd.jar b/src/test/feature/UDF/sql/PLJavaAdd.jar
deleted file mode 100644
index 1041373..0000000
Binary files a/src/test/feature/UDF/sql/PLJavaAdd.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d7e6c196/src/test/feature/UDF/sql/PLJavaAdd.java
----------------------------------------------------------------------
diff --git a/src/test/feature/UDF/sql/PLJavaAdd.java b/src/test/feature/UDF/sql/PLJavaAdd.java
index 2267821..16c57b0 100644
--- a/src/test/feature/UDF/sql/PLJavaAdd.java
+++ b/src/test/feature/UDF/sql/PLJavaAdd.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
public class PLJavaAdd
{
static int add(int x, int y)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d7e6c196/src/test/feature/UDF/sql/PLJavauAdd.jar
----------------------------------------------------------------------
diff --git a/src/test/feature/UDF/sql/PLJavauAdd.jar b/src/test/feature/UDF/sql/PLJavauAdd.jar
deleted file mode 100644
index fafff6b..0000000
Binary files a/src/test/feature/UDF/sql/PLJavauAdd.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d7e6c196/src/test/feature/UDF/sql/PLJavauAdd.java
----------------------------------------------------------------------
diff --git a/src/test/feature/UDF/sql/PLJavauAdd.java b/src/test/feature/UDF/sql/PLJavauAdd.java
index eceffe8..30fe1d5 100644
--- a/src/test/feature/UDF/sql/PLJavauAdd.java
+++ b/src/test/feature/UDF/sql/PLJavauAdd.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
public class PLJavauAdd
{
static int add(int x, int y)