-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ZEPPELIN-1928]: Get a rid of preinstalled external dependencies (nodejs and npm) for maven build #2002
Conversation
zeppelin-web/README.md
Outdated
$ npm install -g yarn | ||
$ yarn install | ||
``` | ||
$ npm install -g yarn bower npm-run-all rimraf grunt webpack karma karma-phantomjs-launcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm don't think 'rimraf grunt webpack karma karma-phantomjs-launcher' are really a required package installed globally for development. Shell we remove them?
Also shell we not use 'npm-run-all' package?
After this PR, every existing developer will face error, such as
$ npm-run-all --parallel dev:server dev:watch
sh: npm-run-all: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
and all developer need to read README.md again and install necessary package. which is big impact compare to benefit that we can get from npm-run-all here.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DmytroShkvyra We don't need to install these packages as global. All packages installed locally (node_modules
) can be used in scripts
tag in package.json
as command like grunt
, webpack
, karma
... except yarn
which is executed by users directly in terminal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is doc for it - https://docs.npmjs.com/misc/scripts#path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doc reference about call script with relative path. In my opinion this is will be a problem because path delimeters are different for Linux and Windows and we should not make zeppelin is platform dependent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm don't think 'rimraf grunt webpack karma karma-phantomjs-launcher' are really a required >package installed globally for development. Shell we remove them?
Also shell we not use 'npm-run-all' package?
Answer - I don't know because this not my code and as far as I understand this code was developed for local development by UI developers whom should care about they local env.
I just tested process which was described in /zeppelin/zeppelin-web/README.md and found out that even after
$ mvn package
I was had to install rimraf grunt webpack karma karma-phantomjs-launcher globally for successful build
yarn build
So I just changed /zeppelin/zeppelin-web/README.md to real state of things.
If you disagree with this i can revert README.md because local UI developmen out of scope ZEPPELIN-1928
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DmytroShkvyra I see. Which environment did you use when it requires install 'rimraf grunt webpack karma karma-phantomjs-launcher' globally?
Because on linux, osx, mvn package
success without installing them globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leemoonsoo Please try build project at clear box (without reinstalled nodejs and npm), and you got a lot of failures at zeppelin-web. And try my patch...
zeppelin-web/add_dependencies.sh
Outdated
@@ -0,0 +1,2 @@ | |||
#!/bin/bash | |||
( sudo apt-get install libfontconfig -y || sudo yum install fontconfig -y ) || exit 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's best idea install package on the system without asking user. Shell we remove this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest this is not the best solution. The best solution would be present all dependencies in phantomjs for all planforms. But this workaround just work in linux and provide automatical build with maven and not required from e.g. (backend developers and wondows users) to be familiar with hodejs npm yarn and other UI-specific things like hidden dependencies and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then how about print message "Please install xxxxx with apt-get install xxxxx command" when required libraries are not available on the system?
I still think installing package without asking user is not really a good idea. And we can't assume that user will build Zeppelin with 'sudo' enabled account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leemoonsoo Mmm, the main goal of this PR is give possibility run
mvn clean package -Pbuild-distr
(see http://zeppelin.apache.org/docs/snapshot/install/build.html#package)
without failures. As you can see in my PR (screenshot section) zeppelin-web builds about 40 minutes. So if hidden dependency was not installed automatically build will be failed after about 50 minutes. And only after this i could show this message. I think this is vesting of time and money (if you use EC2). More over in this case user should waiting for this a front of monitor...
This is normal situation when linux package already installed and user try install it again - this will not changed system state.
BTW, zeppelin developed not only at Ubuntu nodes. What should we do if this is Redhat or Centos or OsX? Fortunately, Windows phantomjs package do not need these hidden dependencies, but Lunuxes need. I suspect that OsX also...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then how about adjust build order? Move 'zeppelin-web' module to the front of build order, so it can fail early?
We never know user want to (or allowed to) install any package on the system or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leemoonsoo I can adjust build order but this do not save enough time - its run about 40 minutes until fail. To be honest I don't understand why you so opposite to automatically install package which should be already installed for build? If you have newer version at your workstation package manager will not reinstall old package. This is a safe operation.
zeppelin-web/pom.xml
Outdated
</goals> | ||
<configuration> | ||
<!--ignore-scripts--> | ||
<arguments>add bower --no-lockfile --no-bin-links</arguments> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need to run
'yarn add bower'
'yarn add karma-phantomjs-launcher'
and we can just run command defined in 'script' field in 'package.json'.
like
'yarn install'
'yarn build'
'yarn test'
we don't want to define the same command in the pom.xml that 'package.json' already has in 'script' field, such as
'bower install'
'webpack build'
'grunt pre-webpack-dist'
'grunt post-webpack-dist'
'karma test'
I think all changes made in 'executions' section of 'frontend-maven-plugin' are unnecessary and should be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be you know better... My main goal is to make developers free from local env for start development and build. Also i wanted give easier ability newbies try zeppelin. I don't care about how to UI developers will run these scripts locally.
They can run this as they used to. I have just changed "postinstall" trigger in package.json because it interfered with "yarn install" from frontend-maven-plugin execution (yarn install). Do you want remove all changes in *.MD or remove all changes in pom and package.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main goal is to make developers free from local env for start development and build.
I assume you meant "local env" -> "local env other than osx, linux". Because at least, osx, linux doesn't require any additional steps to build 'zeppelin-web' module except for just run 'mvn package'.
Like i mentioned above, run 'yarn add xx' changes 'package.json', which is version controlled file. And many section in 'pom.xml' is duplicated with 'package.json'.
How about find alternative way to solve the problem without touching package.json and without duplicating the feature in two different places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leemoonsoo, @1ambda Oh, maybe this was misunderstood. In this context I meant environment which already used UI contributors and their scripts were described in "scripts" in package.json. I Didn't want to broke their usual style of build and test. I have done this only for compatibility with their using of CLI.
@Leemoonsoo Yes duplication Is not good practice
We can get a rid of these "scripts" and run all operations via maven.
e.g. for run build we can run
mvn compile -Dmaven.clean.skip=true
Or if we want to run tests:
mvn test -Dmaven.clean.skip=true
or if we want just create package:
mvn package -Dmaven.clean.skip=true -Dmaven.test.skip=true
Installation of yarn, bower etc. I can put in phase "post-clean". So use -Dmaven.clean.skip=true can save a lot of time for installation of nodejs, yarn and bower
@1ambda @Leemoonsoo Is this variant suit for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current master branch build package with
mvn package
and run test with
mvn test
and it does not install nodejs, yarn, bower every time, unless user run mvn clean
.
So, I'm not quite understand what you're trying to achieve here by running command from maven instead of npm script. Or what problem do you have when you run command from npm script instead of maven. Can you elaborate little more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leemoonsoo which box do you use? Could you give me list of preinstalled packages?
I have used empty headless vagrant images for Centos7 and Ubuntu16 and I have had problem because there were no required packages.
More over at http://zeppelin.apache.org/docs/snapshot/install/build.html#install-requirements
we have list of these required packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leemoonsoo this is your words:
Like i mentioned above, run 'yarn add xx' changes 'package.json', which is version controlled >file. And many section in 'pom.xml' is duplicated with 'package.json'.
How about find alternative way to solve the problem without touching package.json and >without duplicating the feature in two different places?
I have removed "postinstall" from package.json because it is triggered after each
yarn add
and fail build.
If I run
$ yarn install
from command line this also failed (duplicates for ZEPPELIN-1928)
https://issues.apache.org/jira/browse/ZEPPELIN-1019
https://issues.apache.org/jira/browse/ZEPPELIN-1474
https://issues.apache.org/jira/browse/ZEPPELIN-380
If you want to use node modules in terminal, you have to install them globally. (e.g But in case of grunt (and karma so on..), we don't need to do that. Since they are used in |
I dont care about use modules in terminal. I want to run
and execute clean->process-resources->test->package phases of maven automatically, without errors and manual maintenance of local environment. |
My OS ():
P.S. When first assignee have asked for clarification nobody answer him. So say "That's cool. You are trying to modify something without understanding" was a little bit rude because I have tried almost all possible alternatives. |
@DmytroShkvyra Please read and try #2016 Details
|
@DmytroShkvyra Really sorry if you feel like that. But IMO
|
@DmytroShkvyra Should we support build env such as windows on vm? |
Regrading to max call stack size what @DmytroShkvyra mentioned in the above comment (for other people)
|
@1ambda I repeat again (very slowly):
I have written about causes this behaviour - (limit of amount symlinks in Linux and recursive style of package installation with npm and limit of stack size for JS engines in different OSes).
and this:
Why?
or like this:
it triggered postinstall and naturally it fails
It triggered pretest with same result. |
I think the log you'v just posted is quite different. It's not for build. It's for helium, |
@1ambda Yes, this different from build, but cause the same. Helium installed npm with frondend-maven-plugin. |
Could you share the content of I would like to check. It seems that helium bundling failed due to network is offline not because of to max stack size. |
@1ambda No, I want make "normal|classical" maven project which do not need preinstall everybody nodejs and their packages by hand. More over - yarn works faster than npm |
|
@1ambda BTW I have reverted my changes in README.md for build and test from CL and add section about build and test with maven like this example:
Output
|
The problem not in OS or NodeJS. Problem is that I and my colleagues are backend developers whom want develop interpreters and integrate zeppelin (to Hadoop e.g. and other cluster technologies) and the do not know anything about UI development (in common). They use usually vms for testing and development. And they use maven as the most mature build tool. I and my collegues don't want learn nodejs and how to solve it's bugs. I have more than 15 years experience as developer. Last time I have developed UI 7 years ago. Only this gave me possibility find solution fast. To be honest my experience with nodejs was not so sweet. |
Failed tests: |
https://issues.apache.org/jira/secure/attachment/12852597/npm-debug.log |
Installation of hidden dependencies was removed. (accordingly to reviewers comments). |
Incompatible with #2016 |
…failure (BUG) ### What is this PR for? yarn installed by frontend-maven-plugin causes build failure **when there is no nodeJS in local system** To reproduce this bug - Remove system nodejs - Execute `mvn -X clean package -pl 'zeppelin-web' -DskipTests;` #### Details. - yarn installed by frontend-maven-plugin can't run commands described in scripts tag (`package.json`) - it's due to yarn uses npm when run script tags. - so we need to npm as well #### See also #2002 eirslett/frontend-maven-plugin#562 ### What type of PR is it? [Bug Fix] ### Todos * [x] - Rollback yarn to npm * [x] - Update README.md for zeppelin-web ### What is the Jira issue? [ZEPPELIN-2105](https://issues.apache.org/jira/browse/ZEPPELIN-2105) ### How should this be tested? - Remove system nodejs - `mvn -X clean package -pl 'zeppelin-web' -DskipTests;` ### Screenshots (if appropriate) NONE ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO Author: 1ambda <[email protected]> Closes #2016 from 1ambda/ZEPPELIN-2105/rollback-yarn-to-npm and squashes the following commits: c2affeb [1ambda] fix: Install npm as well
…failure (BUG) ### What is this PR for? yarn installed by frontend-maven-plugin causes build failure **when there is no nodeJS in local system** To reproduce this bug - Remove system nodejs - Execute `mvn -X clean package -pl 'zeppelin-web' -DskipTests;` #### Details. - yarn installed by frontend-maven-plugin can't run commands described in scripts tag (`package.json`) - it's due to yarn uses npm when run script tags. - so we need to npm as well #### See also #2002 eirslett/frontend-maven-plugin#562 ### What type of PR is it? [Bug Fix] ### Todos * [x] - Rollback yarn to npm * [x] - Update README.md for zeppelin-web ### What is the Jira issue? [ZEPPELIN-2105](https://issues.apache.org/jira/browse/ZEPPELIN-2105) ### How should this be tested? - Remove system nodejs - `mvn -X clean package -pl 'zeppelin-web' -DskipTests;` ### Screenshots (if appropriate) NONE ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO Author: 1ambda <[email protected]> Closes #2016 from 1ambda/ZEPPELIN-2105/rollback-yarn-to-npm and squashes the following commits: c2affeb [1ambda] fix: Install npm as well (cherry picked from commit 4fd85f7) Signed-off-by: Lee moon soo <[email protected]>
Now it is 2017-09-20, and I cloned the master branch, and the error still occurs:
|
Should I need to modify some files? @1ambda @DmytroShkvyra |
i am not able to get data from hbase using spark hbase connector,
any one did this so plz let me know all of its hbase,spark and other
configuation.
i got Error...
java.io.IOException: java.lang.reflect.InvocationTargetException
at
org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)
at
org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:218)
at
org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:119)
at
org.apache.spark.sql.execution.datasources.hbase.HBaseConnectionCache$$anonfun$getConnection$1.apply(HBaseConnectionCache.scala:141)
at
org.apache.spark.sql.execution.datasources.hbase.HBaseConnectionCache$$anonfun$getConnection$1.apply(HBaseConnectionCache.scala:141)
at
org.apache.spark.sql.execution.datasources.hbase.HBaseConnectionCache$$anonfun$1.apply(HBaseConnectionCache.scala:132)
at
org.apache.spark.sql.execution.datasources.hbase.HBaseConnectionCache$$anonfun$1.apply(HBaseConnectionCache.scala:130)
at
scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:194)
at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:80)
at
org.apache.spark.sql.execution.datasources.hbase.HBaseConnectionCache$.getConnection(HBaseConnectionCache.scala:130)
at
org.apache.spark.sql.execution.datasources.hbase.HBaseConnectionCache$.getConnection(HBaseConnectionCache.scala:141)
at
org.apache.spark.sql.execution.datasources.hbase.RegionResource.init(HBaseResources.scala:93)
at
org.apache.spark.sql.execution.datasources.hbase.ReferencedResource$class.liftedTree1$1(HBaseResources.scala:57)
at
org.apache.spark.sql.execution.datasources.hbase.ReferencedResource$class.acquire(HBaseResources.scala:54)
at
org.apache.spark.sql.execution.datasources.hbase.RegionResource.acquire(HBaseResources.scala:88)
at
org.apache.spark.sql.execution.datasources.hbase.ReferencedResource$class.releaseOnException(HBaseResources.scala:74)
at
org.apache.spark.sql.execution.datasources.hbase.RegionResource.releaseOnException(HBaseResources.scala:88)
at
org.apache.spark.sql.execution.datasources.hbase.RegionResource.<init>(HBaseResources.scala:108)
at
org.apache.spark.sql.execution.datasources.hbase.HBaseTableScanRDD.getP......
…---
*Thanks & Regards*
*Er. Atul VermaStudent of CSE department.*
On Wed, Sep 20, 2017 at 11:46 AM, liang ***@***.***> wrote:
Should I need to modify some files? @1ambda <https://github.com/1ambda>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2002 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AeFWGwGc1sTwoIM4-XPm53V1FfRIm1CIks5skK3TgaJpZM4L8lLl>
.
|
./bin/spark-shell --jars /home/ist/jarfile/shc-core-1.1.1-2.1-s_2.11.jar,/home/iile/hbase-spark-2.0.0-alpha-1.jar,/home/ist/jarfile/hbase-client-1.0.1.1.jar,/home/ist/jarfile/hbase-0.94.2.jar,/home/ist/jarfile/hbase-common-0.98.3-hadoop1.jar
Caused by: java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.util.Addressing.getIpAddress()Ljava/net/InetAddress; |
I installed nodejs and npm before package zeppelin, but another error occurs, a timeout occurs; someone says that it is the yarn problem, and I use the yarn-1.0.2 got a similar error as below, lots of people meet the same problem(see:yarnpkg/yarn#944), can we don't use yarn?
|
What is this PR for?
Get a rid of preinstalled external dependencies (nodejs and npm) for maven build
What type of PR is it?
[Bug Fix | Improvement | Documentation]
Todos
N/A
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1928
Duplicates:
ZEPPELIN-1019
ZEPPELIN-1474
ZEPPELIN-380
How should this be tested?
mvn clean package -Pbuild-distr
Screenshots (if appropriate)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 53.338 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 37.829 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 25.306 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 26.981 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [01:21 min]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 33.265 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [ 3.576 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [ 1.225 s]
[INFO] Zeppelin: Shell interpreter ........................ SUCCESS [ 2.526 s]
[INFO] Zeppelin: Livy interpreter ......................... SUCCESS [03:03 min]
[INFO] Zeppelin: HBase interpreter ........................ SUCCESS [ 17.911 s]
[INFO] Zeppelin: Apache Pig Interpreter ................... SUCCESS [ 13.064 s]
[INFO] Zeppelin: PostgreSQL interpreter ................... SUCCESS [ 4.306 s]
[INFO] Zeppelin: JDBC interpreter ......................... SUCCESS [ 6.681 s]
[INFO] Zeppelin: File System Interpreters ................. SUCCESS [ 4.661 s]
[INFO] Zeppelin: Flink .................................... SUCCESS [ 30.573 s]
[INFO] Zeppelin: Apache Ignite interpreter ................ SUCCESS [ 13.729 s]
[INFO] Zeppelin: Kylin interpreter ........................ SUCCESS [ 2.170 s]
[INFO] Zeppelin: Python interpreter ....................... SUCCESS [ 3.098 s]
[INFO] Zeppelin: Lens interpreter ......................... SUCCESS [ 16.616 s]
[INFO] Zeppelin: Apache Cassandra interpreter ............. SUCCESS [01:11 min]
[INFO] Zeppelin: Elasticsearch interpreter ................ SUCCESS [ 12.687 s]
[INFO] Zeppelin: BigQuery interpreter ..................... SUCCESS [ 24.615 s]
[INFO] Zeppelin: Alluxio interpreter ...................... SUCCESS [ 10.031 s]
[INFO] Zeppelin: Scio ..................................... SUCCESS [ 54.854 s]
[INFO] Zeppelin: web Application .......................... SUCCESS [39:47 min]
[INFO] Zeppelin: Server ................................... SUCCESS [ 36.567 s]
[INFO] Zeppelin: Packaging distribution ................... SUCCESS [23:54 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:16 h
[INFO] Finished at: 2017-02-09T11:07:53+00:00
[INFO] Final Memory: 204M/1102M
[INFO] ------------------------------------------------------------------------
Questions: