我正在尝试运行performance.py开源项目附带的Phoenix Apache脚本。
根据说明(我是python的新手),我执行:
performance.py localhost 999
我收到此错误:
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
所以不确定这里发生了什么。错误Error: Unable to access jarfile 999
表明我没有正确传递值。但是,我按照该脚本中的说明进行操作。
我缺少什么?
附:这种情况发生在Windows Server 2012上
答案 0 :(得分:1)
该脚本正在使用此行:
subprocess.call("java -jar %s %s" % (phoenix_utils.testjar, rowcount), shell=True)
从您的输出中,phoenix_utils.testjar
显然是空白的。您确定要正确设置Java环境吗?
日志中的更高,它说:
错误:无法找到或加载主类 org.apache.phoenix.util.PhoenixRuntime