Repository: bigtop Updated Branches: refs/heads/master b822a6c8e -> 08aa3a267
BIGTOP-2908: use giraph-examples.jar from giraph-doc Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/08aa3a26 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/08aa3a26 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/08aa3a26 Branch: refs/heads/master Commit: 08aa3a267aff2605a06e27c23368e5c17115b122 Parents: b822a6c Author: Kevin W Monroe <[email protected]> Authored: Thu Oct 19 00:57:55 2017 +0000 Committer: Kevin W Monroe <[email protected]> Committed: Thu Oct 19 10:00:43 2017 -0500 ---------------------------------------------------------------------- .../charm/giraph/layer-giraph/reactive/giraph.py | 16 +++++++++++----- .../resources/giraph-examples-1.1.0.jar | Bin 133651 -> 0 bytes 2 files changed, 11 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/08aa3a26/bigtop-packages/src/charm/giraph/layer-giraph/reactive/giraph.py ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/charm/giraph/layer-giraph/reactive/giraph.py b/bigtop-packages/src/charm/giraph/layer-giraph/reactive/giraph.py index 801d081..767a566 100644 --- a/bigtop-packages/src/charm/giraph/layer-giraph/reactive/giraph.py +++ b/bigtop-packages/src/charm/giraph/layer-giraph/reactive/giraph.py @@ -15,11 +15,13 @@ import os +from glob import glob from jujubigdata import utils from path import Path from charms.reactive import is_state, when, when_not, set_state from charms.layer.apache_bigtop_base import Bigtop, get_package_version +from charmhelpers import fetch from charmhelpers.core import hookenv @@ -77,13 +79,17 @@ def install_giraph(giraph): ], ) bigtop.trigger_puppet() + + # Put down the -doc subpackage so we get giraph-examples + fetch.apt_install('giraph-doc') + giraph_home = Path('/usr/lib/giraph') + giraph_docdir = Path('/usr/share/doc/giraph') giraph_libdir = Path(giraph_home / 'lib') - giraph_examples = Path('{}/resources/giraph-examples-1.1.0.jar'.format( - hookenv.charm_dir())) + giraph_examples = glob('{}/giraph-examples-*.jar'.format(giraph_docdir)) # Gather a list of all the giraph jars (needed for -libjars) - giraph_jars = [giraph_examples] + giraph_jars = giraph_examples giraph_jars.extend(get_good_jars(giraph_home, prefix=True)) giraph_jars.extend(get_good_jars(giraph_libdir, prefix=True)) @@ -94,8 +100,8 @@ def install_giraph(giraph): with utils.environment_edit_in_place('/etc/environment') as env: cur_cp = env['HADOOP_CLASSPATH'] if 'HADOOP_CLASSPATH' in env else "" env['GIRAPH_HOME'] = giraph_home - env['HADOOP_CLASSPATH'] = "{ex}:{home}/*:{libs}/*:{cp}".format( - ex=giraph_examples, + env['HADOOP_CLASSPATH'] = "{examples}/*:{home}/*:{libs}/*:{cp}".format( + examples=giraph_docdir, home=giraph_home, libs=giraph_libdir, cp=cur_cp http://git-wip-us.apache.org/repos/asf/bigtop/blob/08aa3a26/bigtop-packages/src/charm/giraph/layer-giraph/resources/giraph-examples-1.1.0.jar ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/charm/giraph/layer-giraph/resources/giraph-examples-1.1.0.jar b/bigtop-packages/src/charm/giraph/layer-giraph/resources/giraph-examples-1.1.0.jar deleted file mode 100644 index 63e0a48..0000000 Binary files a/bigtop-packages/src/charm/giraph/layer-giraph/resources/giraph-examples-1.1.0.jar and /dev/null differ
