[
https://issues.apache.org/jira/browse/HIVE-17988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Voros updated HIVE-17988:
--------------------------------
Attachment: HIVE-17988.1.patch
Attaching patch #1. This changes every {{patch}} to {{git apply}} and removes
the option to specify custom patch command via the PATCH environment variable.
Tested with the following patch files:
{code}
TEST PATCH: /tmp/patch_addonly
diff --git asd asd
new file mode 100644
index 0000000..d72af31
--- /dev/null
+++ asd
@@ -0,0 +1 @@
+asd
diff --git itests/bsd itests/bsd
new file mode 100644
index 0000000..e69de29
TEST PATCH: /tmp/patch_addonlyp1
diff --git a/asd b/asd
new file mode 100644
index 0000000..d72af31
--- /dev/null
+++ b/asd
@@ -0,0 +1 @@
+asd
diff --git a/itests/bsd b/itests/bsd
new file mode 100644
index 0000000..e69de29
TEST PATCH: /tmp/patch_modonly
diff --git pom.xml pom.xml
index dfb29ce..60655c7 100644
--- pom.xml
+++ pom.xml
@@ -1,17 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
TEST PATCH: /tmp/patch_modonlyp1
diff --git a/pom.xml b/pom.xml
index dfb29ce..60655c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,17 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
TEST PATCH: /tmp/patch_newdir
diff --git qwe/qwe qwe/qwe
new file mode 100644
index 0000000..e62415c
--- /dev/null
+++ qwe/qwe
@@ -0,0 +1 @@
+qwe
TEST PATCH: /tmp/patch_newdirp1
diff --git a/qwe/qwe b/qwe/qwe
new file mode 100644
index 0000000..e62415c
--- /dev/null
+++ b/qwe/qwe
@@ -0,0 +1 @@
+qwe
TEST PATCH: /tmp/patch_rmonly
diff --git itests/pom.xml itests/pom.xml
deleted file mode 100644
index 3bf29f9..0000000
--- itests/pom.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.hive</groupId>
- <artifactId>hive</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.hive</groupId>
- <artifactId>hive-it</artifactId>
- <packaging>pom</packaging>
- <version>3.0.0-SNAPSHOT</version>
- <name>Hive Integration - Parent</name>
-
- <properties>
- <hive.path.to.root>..</hive.path.to.root>
- </properties>
-
- <modules>
- <module>custom-serde</module>
- <module>custom-udfs</module>
- <module>hcatalog-unit</module>
- <module>hive-unit</module>
- <module>hive-blobstore</module>
- <module>util</module>
- <module>test-serde</module>
- <module>qtest</module>
- <module>qtest-accumulo</module>
- <module>hive-jmh</module>
- <module>hive-unit-hadoop2</module>
- <module>hive-minikdc</module>
- </modules>
-
- <profiles>
- <profile>
- <id>spark-test</id>
- <activation>
- <property>
- <name>!skipSparkTests</name>
- </property>
- </activation>
- <modules>
- <module>qtest-spark</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>download-spark</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <echo file="target/download.sh">
- set -x
- /bin/pwd
- BASE_DIR=./target
- HIVE_ROOT=$BASE_DIR/../../../
- DOWNLOAD_DIR=./../thirdparty
- download() {
- url=$1;
- finalName=$2
- tarName=$(basename $url)
- rm -rf $BASE_DIR/$finalName
- if [[ ! -f $DOWNLOAD_DIR/$tarName ]]
- then
- curl -Sso $DOWNLOAD_DIR/$tarName $url
- else
- local md5File="$tarName".md5sum
- curl -Sso $DOWNLOAD_DIR/$md5File "$url".md5sum
- cd $DOWNLOAD_DIR
- if type md5sum >/dev/null && ! md5sum -c
$md5File; then
- curl -Sso $DOWNLOAD_DIR/$tarName $url || return 1
- fi
-
- cd -
- fi
- tar -zxf $DOWNLOAD_DIR/$tarName -C $BASE_DIR
- mv
$BASE_DIR/spark-${spark.version}-bin-hadoop2-without-hive $BASE_DIR/$finalName
- }
- mkdir -p $DOWNLOAD_DIR
- download
"http://d3jw87u4immizc.cloudfront.net/spark-tarball/spark-${spark.version}-bin-hadoop2-without-hive.tgz"
"spark"
- cp -f $HIVE_ROOT/data/conf/spark/log4j2.properties
$BASE_DIR/spark/conf/
- </echo>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
TEST PATCH: /tmp/patch_rmonlyp1
diff --git a/itests/pom.xml b/itests/pom.xml
deleted file mode 100644
index 3bf29f9..0000000
--- a/itests/pom.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.hive</groupId>
- <artifactId>hive</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.hive</groupId>
- <artifactId>hive-it</artifactId>
- <packaging>pom</packaging>
- <version>3.0.0-SNAPSHOT</version>
- <name>Hive Integration - Parent</name>
-
- <properties>
- <hive.path.to.root>..</hive.path.to.root>
- </properties>
-
- <modules>
- <module>custom-serde</module>
- <module>custom-udfs</module>
- <module>hcatalog-unit</module>
- <module>hive-unit</module>
- <module>hive-blobstore</module>
- <module>util</module>
- <module>test-serde</module>
- <module>qtest</module>
- <module>qtest-accumulo</module>
- <module>hive-jmh</module>
- <module>hive-unit-hadoop2</module>
- <module>hive-minikdc</module>
- </modules>
-
- <profiles>
- <profile>
- <id>spark-test</id>
- <activation>
- <property>
- <name>!skipSparkTests</name>
- </property>
- </activation>
- <modules>
- <module>qtest-spark</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>download-spark</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <echo file="target/download.sh">
- set -x
- /bin/pwd
- BASE_DIR=./target
- HIVE_ROOT=$BASE_DIR/../../../
- DOWNLOAD_DIR=./../thirdparty
- download() {
- url=$1;
- finalName=$2
- tarName=$(basename $url)
- rm -rf $BASE_DIR/$finalName
- if [[ ! -f $DOWNLOAD_DIR/$tarName ]]
- then
- curl -Sso $DOWNLOAD_DIR/$tarName $url
- else
- local md5File="$tarName".md5sum
- curl -Sso $DOWNLOAD_DIR/$md5File "$url".md5sum
- cd $DOWNLOAD_DIR
- if type md5sum >/dev/null && ! md5sum -c
$md5File; then
- curl -Sso $DOWNLOAD_DIR/$tarName $url || return 1
- fi
-
- cd -
- fi
- tar -zxf $DOWNLOAD_DIR/$tarName -C $BASE_DIR
- mv
$BASE_DIR/spark-${spark.version}-bin-hadoop2-without-hive $BASE_DIR/$finalName
- }
- mkdir -p $DOWNLOAD_DIR
- download
"http://d3jw87u4immizc.cloudfront.net/spark-tarball/spark-${spark.version}-bin-hadoop2-without-hive.tgz"
"spark"
- cp -f $HIVE_ROOT/data/conf/spark/log4j2.properties
$BASE_DIR/spark/conf/
- </echo>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
{code}
> Replace patch utility usage with git apply in ptest
> ---------------------------------------------------
>
> Key: HIVE-17988
> URL: https://issues.apache.org/jira/browse/HIVE-17988
> Project: Hive
> Issue Type: Improvement
> Components: Testing Infrastructure
> Reporter: Zoltan Haindrich
> Assignee: Daniel Voros
> Attachments: HIVE-17988.1.patch
>
>
> It would be great to replace the standard diff util because {{git}} can do a
> 3-way merge - which in most cases successfull.
> This could reduce the ptest results which are erroring out because of build
> failure.
> {code}
> error: patch failed:
> ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:7003
> Falling back to three-way merge...
> Applied patch to
> 'ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java' cleanly.
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)