hadoop - Pass environment variables to Hive Transform or MapReduce -
i trying pass custom environment variable executable (my-mapper.script in example below) used in hive transform eg:
select transform(x, y, z) using 'my-mapper.script' ( select x, y, z table )
i know in hadoop streaming can achieved using
-cmdenv example_dir=/home/example/dictionaries/
but not know how in hive transform/mapreduce.
any ideas?
you can wrap script simple 2 line bash script setup environment. e.g
#!/bin/sh export foo=boo my-mapper.script
and use script in query
using 'wrapper.sh'
my-mapper.script see foo (with value "boo") in environment.
Comments
Post a Comment