Hello Zoltan Chovan, Kudu Jenkins, Abhishek Chennaka,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/21626

to look at the new patch set (#2).

Change subject: [cmake] work around of Gradle-related issues
......................................................................

[cmake] work around of Gradle-related issues

Once Gradle started being invoked to build kudu-subprocess and kudu-hms
JARs as dependency for the C++ server-side of the project, it's become
an issue to get 100% success rate when building it from source.  With
the recent Gradle upgrade the build success rate has reduced further,
it seems.

I decided to address that by adding a few extra flags to the Gradle's
invocations under cmake when building corresponding targets.  Probably,
there is a better way of addressing that (say, finding the root cause
of the issues, reporting, and fixing them), but this simple solution
works well for me.  Also, this solution doesn't affect the build times
of the project (even when using ccache) since the targets built with
Gradle constitute a small part of the rest of the targets that are built
concurrently in a very robust manner.

Prior to this patch, Gradle would error out on follow-up invocations
after the build process has been interrupted, not being able to access
its build cache with an error like below:

--------------------------------------------------
  FAILURE: Build failed with an exception.

  * What went wrong:
  Execution failed for task ':kudu-hive:compileJava'.
  > Could not create service of type DefaultGeneralCompileCaches using 
GradleScopeCompileServices.createGeneralCompileCaches().
     > Cannot lock Java compile cache (...) as it has already been locked by 
this process.
--------------------------------------------------

Prior to this patch, building the project would fail sometimes when
invoking 'cmake -jN' (where N > 1) with errors like below while Gradle
was generating kudu-subprocess.jar and hms-plugin.jar concurrently:

--------------------------------------------------
  ...
  [  4%] Generating ../../../bin/kudu-subprocess.jar
  ...
  [  6%] Generating ../../../bin/hms-plugin.jar
  ...
  java.lang.ArrayIndexOutOfBoundsException: 6
          at 
shadow.org.objectweb.asm.ClassReader.readShort(ClassReader.java:3573)
  ...
          at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at 
org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
          at java.lang.Thread.run(Thread.java:750)

  FAILURE: Build failed with an exception.

  * What went wrong:
  Execution failed for task ':kudu-client:shadowJar'.
  > 6
  ...
  BUILD FAILED in 1m 0s
  make[2]: *** [bin/hms-plugin.jar] Error 1
  make[1]: *** [src/kudu/hms/CMakeFiles/hms_plugin_jar.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
  java.lang.ArrayIndexOutOfBoundsException: 6
          at 
shadow.org.objectweb.asm.ClassReader.readShort(ClassReader.java:3573)
  ...
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnabl
e.run(ThreadFactoryImpl.java:56)
        at java.lang.Thread.run(Thread.java:750)

  FAILURE: Build failed with an exception.

  * What went wrong:
  Execution failed for task ':kudu-subprocess:shadowJar'.
  > 6
  ...
  BUILD FAILED in 1m 3s
  make[2]: *** [bin/kudu-subprocess.jar] Error 1
  make[1]: *** [src/kudu/subprocess/CMakeFiles/subprocess_jar.dir/all] Error 2
  make: *** [all] Error 2
--------------------------------------------------

Change-Id: Ib7d1637854233592ede5388bfc2287df96ec9865
---
M CMakeLists.txt
1 file changed, 18 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/26/21626/2
--
To view, visit http://gerrit.cloudera.org:8080/21626
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib7d1637854233592ede5388bfc2287df96ec9865
Gerrit-Change-Number: 21626
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zcho...@cloudera.com>

Reply via email to