You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2017/12/08 03:03:44 UTC

phoenix git commit: PHOENIX-4444 Build parcels in make_rc.sh (Pedro Boado)

Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11.2 1334b26b8 -> c49de1c5f


PHOENIX-4444 Build parcels in make_rc.sh (Pedro Boado)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/c49de1c5
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c49de1c5
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c49de1c5

Branch: refs/heads/4.x-cdh5.11.2
Commit: c49de1c5f2e5a0fd604efab788ba22c13f619a16
Parents: 1334b26
Author: James Taylor <jt...@salesforce.com>
Authored: Thu Dec 7 19:03:27 2017 -0800
Committer: James Taylor <jt...@salesforce.com>
Committed: Thu Dec 7 19:03:27 2017 -0800

----------------------------------------------------------------------
 dev/make_rc.sh                                  |  42 +++--
 .../MigrateSystemTablesToSystemNamespaceIT.java |   1 -
 .../end2end/SystemTablePermissionsIT.java       |   3 +-
 phoenix-parcel/pom.xml                          | 161 +++----------------
 pom.xml                                         |   3 +-
 5 files changed, 54 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c49de1c5/dev/make_rc.sh
----------------------------------------------------------------------
diff --git a/dev/make_rc.sh b/dev/make_rc.sh
index 638968c..687b23d 100755
--- a/dev/make_rc.sh
+++ b/dev/make_rc.sh
@@ -40,6 +40,9 @@ DIR_BIN=$DIR_REL_BIN_PATH/bin
 DIR_PHERF_CONF=phoenix-pherf/config
 DIR_EXAMPLES=$DIR_REL_BIN_PATH/examples
 DIR_DOCS=dev/release_files
+DIR_PARCEL_TAR=phoenix-parcel/target
+DIR_REL_PARCELS_PATH=$DIR_REL_ROOT/parcels
+SCRIPT_MAKE_MANIFEST=phoenix-parcel/src/build/manifest/make_manifest.py
 
 # Verify no target exists
 mvn clean; rm -rf $DIR_REL_BASE;
@@ -62,6 +65,7 @@ mkdir $DIR_REL_ROOT;
 mkdir $DIR_REL_BIN_PATH;
 mkdir $DIR_REL_BIN_TAR_PATH;
 mkdir $DIR_REL_SRC_TAR_PATH;
+mkdir $DIR_REL_PARCELS_PATH;
 mkdir $DIR_EXAMPLES;
 mkdir $DIR_BIN;
 
@@ -92,29 +96,43 @@ tar cvzf $DIR_REL_BIN_TAR_PATH/$DIR_REL_BIN.tar.gz -C $DIR_REL_ROOT apache-phoen
 rm -rf $DIR_REL_BIN_PATH;
 
 echo "DONE generating binary and source tars in release directory."
+
+# Generate parcels folder
+FILE_PARCEL_TAR=$(find $DIR_PARCEL_TAR -name '*.parcel.tar' -printf '%f\n')
+PARCEL_BASENAME=$(echo $FILE_PARCEL_TAR | sed 's/\.parcel\.tar//')
+
+PARCEL_DISTROS=( "el5" "el6" "el7" "sles11" "sles12" "jessie" "precise" "trusty" "wheezy" "xenial")
+for distro in "${PARCEL_DISTROS[@]}"
+do
+  cp $DIR_PARCEL_TAR/$FILE_PARCEL_TAR $DIR_REL_PARCELS_PATH/$PARCEL_BASENAME-$distro.parcel
+done
+python $SCRIPT_MAKE_MANIFEST $DIR_REL_PARCELS_PATH
+
+echo "DONE copying parcels to release directory."
 echo "Now signing source and binary tars"
 
 # Sign
 function_sign() {
-  phoenix_tar=$(find apache-phoenix-*.gz);
-
+  file=$1
+  echo "Signing file $1"
   # if on MAC OS
   if [[ "$OSTYPE" == "darwin"* ]]; then
-    gpg2 --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar;
-    openssl md5 $phoenix_tar > $phoenix_tar.md5;
-    openssl dgst -sha512 $phoenix_tar > $phoenix_tar.sha;
-    openssl dgst -sha256 $phoenix_tar >> $phoenix_tar.sha;
+    gpg2 --armor --output $file.asc --detach-sig $file;
+    openssl md5 $file > $file.md5;
+    openssl dgst -sha512 $file > $file.sha;
+    openssl dgst -sha256 $file >> $file.sha;
   # all other OS
   else
-    gpg --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar;
-    md5sum -b $phoenix_tar > $phoenix_tar.md5;
-    sha512sum -b $phoenix_tar > $phoenix_tar.sha;
-    sha256sum -b $phoenix_tar >> $phoenix_tar.sha;
+    gpg --armor --output $file.asc --detach-sig $file;
+    md5sum -b $file > $file.md5;
+    sha512sum -b $file > $file.sha;
+    sha256sum -b $file >> $file.sha;
   fi
 }
 
-cd $DIR_REL_BIN_TAR_PATH; function_sign;
-cd $DIR_REL_SRC_TAR_PATH; function_sign;
+cd $DIR_REL_BIN_TAR_PATH; function_sign $(find apache-phoenix-*.gz);
+cd $DIR_REL_SRC_TAR_PATH; function_sign $(find apache-phoenix-*.gz);
+cd $DIR_REL_PARCELS_PATH; for i in *.parcel; do if [ -f "$i" ]; then function_sign $i ; fi; done;
 
 # Tag
 read -p "Do you want add tag for this RC in GIT? (Y for yes or any other key to continue)" prompt

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c49de1c5/phoenix-core/src/it/java/org/apache/phoenix/end2end/MigrateSystemTablesToSystemNamespaceIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MigrateSystemTablesToSystemNamespaceIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MigrateSystemTablesToSystemNamespaceIT.java
index a6a9744..0d64ca9 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MigrateSystemTablesToSystemNamespaceIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MigrateSystemTablesToSystemNamespaceIT.java
@@ -55,7 +55,6 @@ import java.util.Set;
 
 import static org.junit.Assert.*;
 
-@Ignore("This test is flaky, disabled waiting for PHOENIX-4389")
 @Category(NeedsOwnMiniClusterTest.class)
 public class MigrateSystemTablesToSystemNamespaceIT extends BaseTest {
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c49de1c5/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemTablePermissionsIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemTablePermissionsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemTablePermissionsIT.java
index 731d770..4bca0e5 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemTablePermissionsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemTablePermissionsIT.java
@@ -37,6 +37,7 @@ import java.util.Set;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.security.access.AccessControlClient;
 import org.apache.hadoop.hbase.security.access.Permission.Action;
@@ -51,7 +52,6 @@ import org.junit.experimental.categories.Category;
 /**
  * Test that verifies a user can read Phoenix tables with a minimal set of permissions.
  */
-@Ignore("This test is flaky, disabled waiting for PHOENIX-4389")
 @Category(NeedsOwnMiniClusterTest.class)
 public class SystemTablePermissionsIT {
     private static String SUPERUSER;
@@ -85,6 +85,7 @@ public class SystemTablePermissionsIT {
         conf.set("hbase.security.exec.permission.checks", "true");
         conf.set("hbase.security.authorization", "true");
         conf.set("hbase.superuser", SUPERUSER);
+        conf.setInt(HConstants.MASTER_INFO_PORT, -1);
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c49de1c5/phoenix-parcel/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-parcel/pom.xml b/phoenix-parcel/pom.xml
index dbbd10b..26f3cee 100644
--- a/phoenix-parcel/pom.xml
+++ b/phoenix-parcel/pom.xml
@@ -38,7 +38,6 @@
     <source.skip>true</source.skip>
     <top.dir>${project.basedir}/..</top.dir>
     <maven.test.skip>true</maven.test.skip>
-    <phoenix.version>${phoenix.release.version}</phoenix.version>
     <parcel.patch.count>0</parcel.patch.count>
     <parcel.release>0.${parcel.patch.count}</parcel.release>
     <parcel.folder>APACHE_PHOENIX-${phoenix.version}-${cdh.version}.p${parcel.release}</parcel.folder>
@@ -53,8 +52,28 @@
   </properties>
 
   <build>
-
     <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.0.0</version>
+        <executions>
+          <execution>
+            <id>regex-property</id>
+            <phase>initialize</phase>
+            <goals>
+              <goal>regex-property</goal>
+            </goals>
+            <configuration>
+              <name>phoenix.version</name>
+              <value>${project.version}</value>
+              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?$</regex>
+              <replacement>$1.$2.$3</replacement>
+              <failIfNoMatch>true</failIfNoMatch>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <!-- No jars created for this module -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -89,144 +108,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>com.coderplus.maven.plugins</groupId>
-        <artifactId>copy-rename-maven-plugin</artifactId>
-        <version>1.0.1</version>
-        <executions>
-          <execution>
-            <id>copy-file-el6</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-el6.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-el5</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-el5.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-el7</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-el7.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-sles11</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-sles11.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-sles12</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-sles12.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-precise</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-precise.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-jessie</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-jessie.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-trusty</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-trusty.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-wheezy</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-wheezy.parcel</destinationFile>
-            </configuration>
-          </execution>
-          <execution>
-            <id>copy-file-xenial</id>
-            <phase>package</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.build.directory}/${parcel.folder}.parcel.tar</sourceFile>
-              <destinationFile>${project.build.directory}/${parcel.folder}-xenial.parcel</destinationFile>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>make-manifest</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <executable>python</executable>
-          <workingDirectory>${project.build.directory}</workingDirectory>
-          <arguments>
-            <argument>${project.basedir}/src/build/manifest/make_manifest.py</argument>
-            <argument>${project.build.directory}</argument>
-          </arguments>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c49de1c5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e730b4a..961f0e5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,8 +94,7 @@
     <hadoop-two.version>${cdh.hadoop.version}</hadoop-two.version>
 
     <!-- Dependency versions -->
-    <phoenix.release.version>4.13.1</phoenix.release.version>
-    <cdh.version.number>5.11.2</cdh.version.number>
+    <cdh.version.number>${cdh.parent.version}</cdh.version.number>
     <cdh.version>cdh${cdh.version.number}</cdh.version>
     <commons-cli.version>1.2</commons-cli.version>
     <hive.version>${cdh.hive.version}</hive.version>