HUE-8307 [pig] Unable to use piggybank installed with Pig examples

Review Request #12964 - Created May 18, 2018 and updated

Ivan Dzikovsky
hue
HUE-8307
hue

piggybank.jar should be registred explicitly in PIG script to be available in code.

So I've added following statement in example code:

REGISTER hdfs:///user/hue/pig/examples/piggybank.jar;

Than I've discovered that option pig.local_sample_dir is ignored in hue.ini, as in pig/conf.py Hue expects to get this option with different name (local_data_dir).
So I've changed expected key in pig/conf.py, not to change this configuration property name in hue.ini (for compatibility).

Also, I've rewrote description of this property, to better reflect how its used in code:
https://github.com/idzikovsky/hue/blob/HUE-8307/apps/pig/src/pig/management/commands/pig_setup.py#L106

Manual

  • 2
  • 0
  • 0
  • 0
  • 2
Description From Last Updated
This is the new way of doing since Hue 4.0 indeed. How about reusing the local_sample_dir variable withLOCAL_SMAPLE_DIR.get() from pig.conf ... Romain Rigaux
Nit: for the record, usually we simplify a bit with: ' %(root_path)s .... %(root_path)s ' % {'root_path': '/...'} Romain Rigaux
  1. 
      
  2. This is the new way of doing since Hue 4.0 indeed.

    How about reusing the local_sample_dir variable withLOCAL_SMAPLE_DIR.get()

    from pig.conf import LOCAL_SMAPLE_DIR

    ?

    1. Maybe REMOTE_SAMPLE_DIR, not the LOCAL_SAMPLE_DIR, as these file pathes are supposed to be on HDFS, not on local filesystem?

    2. I've updated patch and PR with REMOTE_SAMPLE_DIR for now.

  3. 
      
Review request changed
  1. 
      
  2. Nit: for the record, usually we simplify a bit with:

    ' %(root_path)s .... %(root_path)s ' % {'root_path': '/...'}

  3. 
      
Loading...