You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2011/10/11 04:17:06 UTC
svn commit: r1181530 -
/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/PriorityCompactionQueue.java
Author: nspiegelberg
Date: Tue Oct 11 02:17:06 2011
New Revision: 1181530
URL: http://svn.apache.org/viewvc?rev=1181530&view=rev
Log:
Add null check which otherwise causes NPE in logging
Summary:
Needed a not null check in a place we were logging
Test Plan:
Not tested, but a very straightforward fix.
Reviewed By: kannan
Reviewers: liyintang, kannan, nspiegelberg
CC: , kannan
Differential Revision: 240220
Modified:
hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/PriorityCompactionQueue.java
Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/PriorityCompactionQueue.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/PriorityCompactionQueue.java?rev=1181530&r1=1181529&r2=1181530&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/PriorityCompactionQueue.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/PriorityCompactionQueue.java Tue Oct 11 02:17:06 2011
@@ -67,7 +67,8 @@ public class PriorityCompactionQueue imp
if (queuedRequest == null ||
newRequest.getPriority() < queuedRequest.getPriority()) {
String reason = "";
- if (newRequest.getPriority() < queuedRequest.getPriority()) {
+ if (queuedRequest != null &&
+ newRequest.getPriority() < queuedRequest.getPriority()) {
reason = "Reason : priority changed from " +
queuedRequest.getPriority() + " to " +
newRequest.getPriority() + ". ";