我已经设置了两(2)个节点Cassandra集群并尝试使用shark执行查询。但查询大约需要10分钟。但查询工作正常。 (我用Cloudera为我安装软件)
Time taken: 421.189 seconds
shark>
我尝试通过更改 /opt/shark/shark/conf/shark-env.sh 中的一些参数(增加:SPARK_MEM和SHARK_MASTER_MEM)来调整鲨鱼。但是没有运气。
非常感谢,如果有人能给我这种缓慢的任何线索吗?
以下是我为各种软件安装的版本列表:
Cassandra :2.0.8
Shark :shark-0.9.1-bin-cdh4.6.0-fe75a886
Spark :SPARK-0.9.0-1.cdh4.6.0.p0.98
Hadoop :2.0.0-cdh4.7.0
硬件规格:
RAM :256GB
CPU :2x Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz(共有20个核心HT)
答案 0 :(得分:0)
cqlsh:db> SELECT * FROM table;
在CQL shell中只需不到一秒钟。
但在鲨鱼中需要大约10秒钟。
shark> USE db; SELECT * FROM table;
...
Time taken: 11.274 seconds
shark dir中有bin/shark-withinfo
个可执行文件,它为请求提供了一些信息。也许它会为你的案子提供一些启示。在我的例子中,它说大量的任务是为了处理我的请求。所以我猜大学时间吃的就是学校,但我不太舒服
...
14/07/09 17:35:19 INFO scheduler.TaskSetManager: Starting task 0.0:255 as TID 255 on executor localhost: localhost (PROCESS_LOCAL)
14/07/09 17:35:19 INFO scheduler.TaskSetManager: Serialized task 0.0:255 as 5456 bytes in 0 ms
14/07/09 17:35:19 INFO executor.Executor: Running task ID 255
14/07/09 17:35:19 INFO scheduler.TaskSetManager: Finished TID 254 in 30 ms on localhost (progress: 255/257)
14/07/09 17:35:19 INFO scheduler.DAGScheduler: Completed ResultTask(0, 254)
14/07/09 17:35:19 INFO storage.BlockManager: Found block broadcast_0 locally
14/07/09 17:35:19 INFO rdd.HadoopRDD: Input split: localhost 9160 org.apache.cassandra.dht.Murmur3Partitioner
14/07/09 17:35:19 INFO cql.HiveCqlInputFormat: Validators : null
14/07/09 17:35:19 INFO exec.FileSinkOperator: Initializing Self 260 FS
14/07/09 17:35:19 INFO exec.FileSinkOperator: Operator 260 FS initialized
14/07/09 17:35:19 INFO exec.FileSinkOperator: Initialization Done 260 FS
14/07/09 17:35:19 INFO exec.FileSinkOperator: Final Path: FS file:...
14/07/09 17:35:19 INFO exec.FileSinkOperator: Writing to temp file: ...
14/07/09 17:35:19 INFO exec.FileSinkOperator: New Final Path: ...
14/07/09 17:35:19 INFO executor.Executor: Serialized size of result for 255 is 563
14/07/09 17:35:19 INFO executor.Executor: Sending result for 255 directly to driver
14/07/09 17:35:19 INFO executor.Executor: Finished task ID 255
...