Skip to content
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

Support for Phoenix 4.5.2 #65

Merged
merged 1 commit into from
Oct 6, 2015
Merged

Support for Phoenix 4.5.2 #65

merged 1 commit into from
Oct 6, 2015

Conversation

bpanneton
Copy link
Contributor

Note: If you want to use spark with phoenix, use version 1.3.1-bin-hadoop2.6

@chu11
Copy link
Member

chu11 commented Sep 24, 2015

Hey Brian, skimming through your patch, it looks good at a high level. I need to sit down and learn a bit more about Phoenix so I can understand the details of what you've scripted.

But in the mean time, a few higher level comments and patch splits I'd like to see.

  1. Spark 1.3.1 support should be in the master branch now. So we can remove that chunk of your patch.

  2. Could the spark driver classpath and library path config support be split off into a separate patch.

  3. Likewise the support of setting the Hbase classpath in hbase-env.sh

  4. You'll notice in a few of the conf files, I use a "@foo@" notation to add additional extra fields into a config file for several circumstances. Such as "@uda@" in mapred-site-2.0.xml. You can see how in magpie-setup-hadoop how I add extra configs into mapred-site.xml. Could you follow the same style for the extra configs you need for Phoenix in hbase-site.xml.

  5. Why not add a new "hbase-with-hdfs-with-phoenix" submission script?

  6. I also noted a possible bug in the code comments.

@chu11
Copy link
Member

chu11 commented Sep 24, 2015

errr Spark 1.3.1 should be in the master very soon ...

it's in master now

@bpanneton
Copy link
Contributor Author

Not sure how much it matters, but I was using the spark version with hadoop 2.6 rather than 2.4. I'll test it out and see what happens.

@chu11
Copy link
Member

chu11 commented Sep 25, 2015

Cool. As I've added more versions of software support there are clear version combinations that work / not work. I'm going to add a documentation chunk on that semi-soon. We can add your combinations info to that too.

@bpanneton bpanneton force-pushed the setup-phoenix branch 2 times, most recently from 5a9ec7d to ce51630 Compare September 25, 2015 20:23
@bpanneton
Copy link
Contributor Author

Works with 2.4 so I stuck with that. I think I covered everything you mentioned.

@chu11
Copy link
Member

chu11 commented Oct 1, 2015

Beginning to look through this. It appears you accidentally added the temporary "substitution" files that are generated by the Makefile into this patch. e.g. magpie-magpie-customizations-substitution

echo "* Phoenix Information"
echo "*"
echo "* To access phoenix directly, you'll want to:"
echo "* ${magpieremotecmd} ${HBASE_MASTER_NODE}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be tweaked for changes in master

@chu11
Copy link
Member

chu11 commented Oct 2, 2015

Tried to do a run and hit some issues. What java version are you using and what hadoop version / hbase version?

@bpanneton
Copy link
Contributor Author

I'll fix those issues up that were mentioned. Hadoop is 2.7.1 and jdk1.7.0_17. What were the issues you ran into? I might have seen them already.

@bpanneton bpanneton force-pushed the setup-phoenix branch 2 times, most recently from 0328108 to b677855 Compare October 2, 2015 14:07
@chu11
Copy link
Member

chu11 commented Oct 2, 2015

Hit this when the performance run begins. Normally means you need java 1.7.

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/phoenix/util/PhoenixRuntime : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.phoenix.util.PhoenixRuntime.  Program will exit.

@bpanneton
Copy link
Contributor Author

Which version were you using? I guess I never saw that since I'm using 1.7

@chu11
Copy link
Member

chu11 commented Oct 2, 2015

Using 1.7 as well /usr/lib/jvm/jre-1.7.0-oracle.x86_64/. You didn't recompile Phoenix or anything? I'm trying the binary I directly downloaded for Hbase 1.1.

@bpanneton
Copy link
Contributor Author

I used the following from apache: phoenix/phoenix-4.5.2-HBase-1.1/bin/phoenix-4.5.2-HBase-1.1-bin.tar.gz

@bpanneton
Copy link
Contributor Author

I'm going to retry the test all quick as well.

@chu11
Copy link
Member

chu11 commented Oct 2, 2015

Ahhh, I think I know what it is. Phoenix's script isn't honoring JAVA_HOME. It's picking up whatever is in its path.

@bpanneton
Copy link
Contributor Author

Weird, queryserver looks for JAVA_HOME but that doesn't run during the performance.

@bpanneton
Copy link
Contributor Author

I can change the command to something like this:
command="PATH=${JAVA_HOME}/bin:$PATH python ${PHOENIX_HOME}/${phoenixcmdprefix}/performance.py $zookeepernode $phoenixrowcount"

@chu11
Copy link
Member

chu11 commented Oct 2, 2015

We can do that or something similar as a temporary hack. I went ahead and created a ticket upstream for Phoenix. https://issues.apache.org/jira/browse/PHOENIX-2303

@bpanneton
Copy link
Contributor Author

I pushed it and 'think' it should work. Also sent you a quick patch for Phoenix.

@chu11
Copy link
Member

chu11 commented Oct 2, 2015

Didn't work for me

/home/achu/hadoop/magpie/magpie-run-phoenix-performanceeval: line 53: PATH=/usr/lib/jvm/jre-1.7.0-oracle.x86_64//bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/global/tools/totalview/m/apex/default/bin:/collab/usr/global/tools/git/chaos_5_x86_64_ib/git-1.8.5.2/bin:/home/achu/bin/htp-1.16/src:/home/achu/bin/git-1.7.7:/home/achu/bin/apache-ant-1.9.1/bin:/home/achu/bin/apache-forrest-0.9/bin:/home/achu/bin/apache-maven-3.0.5/bin:/home/achu/bin/protobuf-2.5.0/src:.: No such file or directory

I think you'd have to export PATH to make it work. Would it be better/easier if we patched Phoenix 4.5.2 instead? This may not be the only issue in the phoenix scripts.

@bpanneton
Copy link
Contributor Author

sure let me add the patch instead

@bpanneton
Copy link
Contributor Author

I think I got everything now.

then
echo "Zookeeper must be enabled for Hbase"
exit 1
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't necessary b/c it's checked w/n hbase right? And we already checked for hbase_setup == yes?

@chu11
Copy link
Member

chu11 commented Oct 5, 2015

There is a subtlety in magpie-run that I may be missing w/ Phoenix. Why is queryserver.py only started/stopped when PHOENIX_MODE = server. Doesn't Phoenix need the queryserver all the time? Or is it only needed on certain types of jobs?

I'm only confused b/c this is a unique setup of Phoenix compared to the other things Magpie supports. So I bet there's something I'm missing.

Other than that, just a few more notes. We're getting close :-)

@bpanneton
Copy link
Contributor Author

So in regards to the server mode. You can run psql or sqlline which don't require the queryserver to run. I believe the queryserver is used more when you are running something like spark or with the jdbc where you would use zookeepers quorum. (I'm still not an expert on phoenix yet : P)

My thought was that if you were going to be in interactive mode for Phoenix you would be using psql.py or sqlline.py thus you wouldn't need the queryserver. But if you were running a spark job you would set Phoenix to server mode since you would want to interact with the queryserver.

@bpanneton bpanneton force-pushed the setup-phoenix branch 2 times, most recently from 0d6168d to ee5148a Compare October 5, 2015 18:13
@bpanneton
Copy link
Contributor Author

Just wanted to add some more info to my previous message:

Think of phoenix as a light weight layer on top of hbase. Similar in a way to how pig acts.

@chu11
Copy link
Member

chu11 commented Oct 5, 2015

Ok, that makes sense. If the assumptions are wrong in the future, it'll just take a tweak to fix.


You'll likely want to start with the base script
(e.g. magpie.sbatch-srun) for your scheduler/resource manager.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be magpie.sbatch-srun-hbaes-with-hdfs-with-phoenix? This is what I had for hadoop

   You'll likely want to start with the base hadoop script
   (e.g. magpie.sbatch-srun-hadoop) for your scheduler/resource
   manager.  If you wish to configure more, you can choose to start
   with the base script (e.g. magpie.sbatch-srun) which contains all
   configuration options.

# Phoenix's test relies on HBASE_CONF_DIR being set so make sure its from a region server
regionserver=$(cat $HBASE_CONF_DIR/regionservers | head -n 1)
export HBASE_CONF_DIR=$(echo ${PHOENIX_CONF_DIR} | sed "s/$(hostname)/$regionserver/g")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused what's going on here. Why would HBASE_CONF_DIR have to be modified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally Phoenix only looks for HBASE_CONF_DIR. (Prior comment explains more)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been corrected and now works as you would expect.

@bpanneton
Copy link
Contributor Author

I revamped a good portion of that code and I think if follows the other modules more closely now.

if [ "$1X" == "X" ]
then
echo "User must specify path to Phoenix config as first argument"
exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this error message isn't consistent to comments above

@bpanneton bpanneton force-pushed the setup-phoenix branch 2 times, most recently from 69ef5c1 to 35a4698 Compare October 6, 2015 18:08
@bpanneton
Copy link
Contributor Author

Those should be good now

Note: If you want to use spark with phoenix, use version 1.3.1-bin-hadoop2.4
@chu11
Copy link
Member

chu11 commented Oct 6, 2015

LGTM

chu11 added a commit that referenced this pull request Oct 6, 2015
@chu11 chu11 merged commit 150e2fb into LLNL:master Oct 6, 2015
@bpanneton bpanneton deleted the setup-phoenix branch December 8, 2015 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants