2016-06-22 4 views
1

과 결과를 검색 할 수 없습니다 나는 내가 하이브/임팔라 통해 실행 다음과 같은 쿼리가 :임팔라 쿼리는 NullPointerException이

select count(p.id) as tweet_count, p.author as author,p.profile_image_url as profile_image_url,p.screen_name as screen_name, 
concat_ws('/',min(p.postday),min(p.postmonth),min(p.postyear)) as creation_date,p.message message,af.followerid as follower 
from post p 
inner join author_follower af on af.id like if(p.author= null, '', concat(p.author,'%')) 
where p.hashtaglist like 'hashtagtobeused' 
group by author,profile_image_url,screen_name,message,follower 
ORDER BY cast(min(postyear) as int),cast(min(postmonth) as int),cast(min(postday) as int),cast(min(posthour) as int) ASC; 

을하지만, 나는 다음과 같은 오류 결과를 얻을 어떤 이유로

귀하의 쿼리는 다음과 같은 오류가 (들) :

Bad status for request 3304: TGetOperationStatusResp(status=TStatus(errorCode=None, errorMessage=None, sqlState=None, infoMessages=None, statusCode=0), operationState=5, errorMessage=None, sqlState=None, errorCode=None) 

나는 쿼리를 확인하고 나는 누군가가 도와 드리고, 문제는 내가이 오류가 왜 대신 결과입니다 곳으로 안내하시기 바랍니다 수 있습니다, 함께 문제를 찾을 수 있습니까? set

+1

는 그 메시지는 의미 -

SELECT COUNT(p.id) AS tweet_count, p.author AS author, p.profile_image_url AS profile_image_url, p.screen_name AS screen_name, concat_ws('/', MIN(p.postday), MIN(p.postmonth), MIN(p.postyear)) AS creation_date, p.message AS MESSAGE, af.followerid AS follower FROM post p INNER JOIN author_follower af ON af.id LIKE IF(p.author = NULL, '', concat(p.author, '%')) WHERE p.hashtaglist LIKE 'hashtagtobeused' GROUP BY author, profile_image_url, screen_name, MESSAGE, follower ORDER BY CAST(MIN(postyear) AS INT), CAST(MIN(postmonth) AS INT), CAST(MIN(postday) AS INT), CAST(MIN(posthour) AS INT) ASC; 

는 (훌륭한 도구가 고려 그런데, 나는 확인하고 쿼리 구문을 포맷 dbVisualizer을 사용) - 서버 쪽 임팔라 로그를보고 이유와 방법을 이해하십시오. 나는 이미 잔인한'SEGV' 저수준 프로세스 실패로 데몬이 충돌하는 것을 보았습니다 (C++은 빠르지 만 메모리 핸들링 버그는 용서가되지 않습니다 ...) –

답변

1

공백과 같은 간단한 문제로 인해 SQL 구문 분석 자체가 실패 할 경우 Impala에서 SEGV로 인해 충돌이 발생하는 것처럼 쿼리를 신중하게 다시 포맷하는 것을 고려하십시오. Cloudera를 실행 중이면 /run/cloudera-scm-agent/process에 쿼리를 실행 한 노드의 로그가 있습니다.

우리는 SQL 형식에주의하여 이러한 문제를 해결했습니다. 이는 쿼리 오류가 쉽게 나타나기 때문에 좋은 방법입니다. * "서버가 실패 (또는 충돌)했다"*