0

I am trying to run the performance.py script that comes with the Phoenix Apache open source project.

Per instructions (I am new to python), I execute:

performance.py localhost 999

I get this error:

Phoenix Performance Evaluation Script 1.0
-----------------------------------------

Creating performance table...
Error: Could not find or load main class org.apache.phoenix.util.PhoenixRuntime
Query # 1 - Count - SELECT COUNT(1) FROM PERFORMANCE_999;
Query # 2 - Group By First PK - SELECT HOST FROM PERFORMANCE_999 GROUP BY HOST;
Query # 3 - Group By Second PK - SELECT DOMAIN FROM PERFORMANCE_999 GROUP BY DOM
AIN;
Query # 4 - Truncate + Group By - SELECT TRUNC(DATE,'DAY') DAY FROM PERFORMANCE_
999 GROUP BY TRUNC(DATE,'DAY');
Query # 5 - Filter + Count - SELECT COUNT(1) FROM PERFORMANCE_999 WHERE CORE<10;


Generating and upserting data...
Error: Unable to access jarfile 999


Error: Could not find or load main class org.apache.phoenix.util.PhoenixRuntime

So not sure whats going on here. Error Error: Unable to access jarfile 999 suggests that I not passing in values correctly. However, I am following the instructions in that script.

What am I missing?
P.S. This is happening on Windows Server 2012

AngryHacker
  • 59,598
  • 102
  • 325
  • 594
  • I'm unfamiliar with the project. Are you supplying the jarfile, or is that supplied in the package? – That1Guy Sep 04 '15 at 17:02

2 Answers2

1

That script is using this line:

subprocess.call("java -jar %s %s" % (phoenix_utils.testjar, rowcount), shell=True)

And from your output, the phoenix_utils.testjar is obviously blank. Are you sure you have the Java environment setup correctly?

Even higher in your log, it says:

Error: Could not find or load main class org.apache.phoenix.util.PhoenixRuntime

Brian Pendleton
  • 839
  • 4
  • 13
  • I can run java.exe from the command line and it finds it. So I think it is setup reasonably well (since all other java stuff runs well). Its an Hadoop/HBase cluster in Azure, so I assume they know what they are doing. – AngryHacker Sep 04 '15 at 17:19
  • When the script runs, does it have the same classpath as when you run yourself in the command prompt? It might be something wierd with python creating a process and running that with a different environment variables? – Brian Pendleton Sep 04 '15 at 17:24
1

I also met the same issue. Digging into the script, it is due to the phoenix-core-xxx-tests.jar in an incorrect directory, so the script cannot find it.

looking at phoenix_utils.py, it is pointing the test jar to phoenix_root_directory. But the jar is actually locating on phoenix_root_directory/lib.

copy the jar to the root directory and cd to the phoenix_root_directory/bin and run the performance.py.

onpduo
  • 979
  • 6
  • 3