~bigdata-dev/charms/trusty/apache-zeppelin/trunk

« back to all changes in this revision

Viewing changes to hooks/callbacks.py

  • Committer: amir sanjar
  • Date: 2015-08-25 18:27:02 UTC
  • Revision ID: amir.sanjar@canonical.com-20150825182702-9uw4cixshlrxdsl3
add Flume tutorial

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        # default env). Include our own tutorial, which does work in a
90
90
        # spark+hdfs env. Inspiration for this notebook came from here:
91
91
        #   https://github.com/apache/incubator-zeppelin/pull/46
92
 
        tutorial_source = Path('resources/hdfs-tutorial')
93
 
        tutorial_source.copytree(self.dist_config.path('zeppelin_notebooks') / 'hdfs-tutorial')
 
92
        self.copy_tutorial("hdfs-tutorial")
 
93
        self.copy_tutorial("flume-tutorial")
 
94
        
 
95
        
 
96
    def copy_tutorial(self, tutorial_name):
 
97
        
 
98
        tutorial_source = Path('resources/{}'.format(tutorial_name))
 
99
        tutorial_source.copytree(self.dist_config.path('zeppelin_notebooks') / tutorial_name)
94
100
 
95
101
        # move the tutorial dir included in the tarball to our notebook dir and
96
102
        # symlink that dir under our zeppelin home. we've seen issues where
106
112
        # make sure the notebook dir's contents are owned by our user
107
113
        cmd = "chown -R ubuntu:hadoop {}".format(notebook_dir)
108
114
        call(cmd.split())
 
115
        
109
116
 
110
117
    def configure_zeppelin(self):
111
118
        '''