hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scan-ad...@coverity.com
Subject New Defects reported by Coverity Scan for Apache HBase
Date Tue, 07 Oct 2014 19:53:11 GMT

Hi,

Please find the latest report on new defect(s) introduced to Apache HBase found with Coverity
Scan.

108 new defect(s) introduced to Apache HBase found with Coverity Scan.
93 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed
by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 20 of 108 defect(s)


** CID 1243663:  Unguarded write  (GUARDED_BY_VIOLATION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/UserQuotaState.java: 198 in org.apache.hadoop.hbase.quotas.UserQuotaState.getTableLimiter(org.apache.hadoop.hbase.TableName)()

** CID 1243668:  Unguarded read  (GUARDED_BY_VIOLATION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MultiHConnection.java: 75 in org.apache.hadoop.hbase.util.MultiHConnection.close()()

** CID 1243651:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java:
318 in org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.isRegionStillOpening(org.apache.hadoop.hbase.HRegionInfo,
org.apache.hadoop.hbase.regionserver.RegionServerServices)()

** CID 1243674:  Dereference null return value  (NULL_RETURNS)
/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/row/TestPrefixTreeSearcher.java:
215 in org.apache.hadoop.hbase.codec.prefixtree.row.TestPrefixTreeSearcher.testSeekWithPrefix()()

** CID 1243615:  Unused value  (UNUSED_VALUE)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: 5450 in org.apache.hadoop.hbase.regionserver.HRegion.append(org.apache.hadoop.hbase.client.Append,
long, long)()

** CID 1243629:  AT: Possible atomicity violation  (FB.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: 2076 in
org.apache.hadoop.hbase.master.AssignmentManager.onRegionFailedOpen(org.apache.hadoop.hbase.master.RegionState,
org.apache.hadoop.hbase.HRegionInfo, org.apache.hadoop.hbase.ServerName)()

** CID 1243621:  Dm: Dubious method used  (FB.DM_DEFAULT_ENCODING)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java: 2583
in org.apache.hadoop.hbase.regionserver.HRegionServer.closeRegion(java.lang.String, boolean,
org.apache.hadoop.hbase.ServerName)()

** CID 1243609:  MWN: Mismatched wait() or notify()  (FB.MWN_MISMATCHED_NOTIFY)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java: 1761
in org.apache.hadoop.hbase.regionserver.wal.HLogSplitter$LogReplayOutputSink.flush()()

** CID 1243595:  RV: Bad use of return value  (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java:
147 in org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionEnvironment.offerExecutionLatency(long)()

** CID 1243631:  UwF: Unwritten field  (FB.UWF_NULL_FIELD)
/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java:
101 in ()

** CID 1066078:  RV: Bad use of return value  (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: 1916 in
org.apache.hadoop.hbase.master.AssignmentManager.invokeAssign(org.apache.hadoop.hbase.HRegionInfo)()

** CID 1114100:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java: 1277 in org.apache.hadoop.hbase.util.FSUtils.getTableDirs(org.apache.hadoop.fs.FileSystem,
org.apache.hadoop.fs.Path)()

** CID 1203014:  Resource leak on an exceptional path  (RESOURCE_LEAK)
/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java: 83 in
org.apache.hadoop.hbase.master.MasterStatusServlet.doGet(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)()

** CID 1203004:  Explicit null dereferenced  (FORWARD_NULL)

** CID 1203001:  Explicit null dereferenced  (FORWARD_NULL)

** CID 1064859:  Unguarded write  (GUARDED_BY_VIOLATION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java:
349 in org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager.preLogRoll(org.apache.hadoop.fs.Path)()

** CID 1064941:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java:
281 in org.apache.hadoop.hbase.replication.regionserver.ReplicationSource.run()()

** CID 1090441:  Dereference after null check  (FORWARD_NULL)
/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java:
139 in org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication$Verifier.map(org.apache.hadoop.hbase.io.ImmutableBytesWritable,
org.apache.hadoop.hbase.client.Result, org.apache.hadoop.mapreduce.Mapper$Context)()

** CID 1064970:  Dereference null return value  (NULL_RETURNS)

** CID 1064964:  Dereference null return value  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1243663:  Unguarded write  (GUARDED_BY_VIOLATION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/UserQuotaState.java: 198 in org.apache.hadoop.hbase.quotas.UserQuotaState.getTableLimiter(org.apache.hadoop.hbase.TableName)()
192        * If the table does not have its own quota limiter the global one will be returned.
193        * In case there is no quota limiter associated with this object a noop limiter
will be returned.
194        *
195        * @return the quota limiter for the specified table
196        */
197       public synchronized QuotaLimiter getTableLimiter(final TableName table) {
>>>     CID 1243663:  Unguarded write  (GUARDED_BY_VIOLATION)
>>>     Accessing "lastQuery" without holding lock "QuotaState.this". Elsewhere,
"org.apache.hadoop.hbase.quotas.QuotaState.lastQuery" is accessed with "QuotaState.this" held
2 out of 3 times.
198         lastQuery = EnvironmentEdgeManager.currentTime();
199         if (tableLimiters != null) {
200           QuotaLimiter limiter = tableLimiters.get(table);
201           if (limiter != null) return limiter;
202         }
203         if (namespaceLimiters != null) {

________________________________________________________________________________________________________
*** CID 1243668:  Unguarded read  (GUARDED_BY_VIOLATION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MultiHConnection.java: 75 in org.apache.hadoop.hbase.util.MultiHConnection.close()()
69       }
70     
71       /**
72        * Close the open connections and shutdown the batchpool
73        */
74       public void close() {
>>>     CID 1243668:  Unguarded read  (GUARDED_BY_VIOLATION)
>>>     Accessing "hConnections" without holding lock "MultiHConnection.hConnections".
Elsewhere, "org.apache.hadoop.hbase.util.MultiHConnection.hConnections" is accessed with "MultiHConnection.hConnections"
held 5 out of 7 times.
75         if (hConnections != null) {
76           synchronized (hConnections) {
77             if (hConnections != null) {
78               for (Connection conn : hConnections) {
79                 if (conn != null) {
80                   try {

________________________________________________________________________________________________________
*** CID 1243651:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java:
318 in org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.isRegionStillOpening(org.apache.hadoop.hbase.HRegionInfo,
org.apache.hadoop.hbase.regionserver.RegionServerServices)()
312         }
313       }
314     
315       private static boolean isRegionStillOpening(
316           HRegionInfo regionInfo, RegionServerServices rsServices) {
317         byte[] encodedName = regionInfo.getEncodedNameAsBytes();
>>>     CID 1243651:  Dereference null return value  (NULL_RETURNS)
>>>     Calling a method on null object "rsServices.getRegionsInTransitionInRS()".
318         Boolean action = rsServices.getRegionsInTransitionInRS().get(encodedName);
319         return Boolean.TRUE.equals(action); // true means opening for RIT
320       }
321     
322       private boolean isRegionStillOpening() {
323         return isRegionStillOpening(regionInfo, rsServices);
324       }

________________________________________________________________________________________________________
*** CID 1243674:  Dereference null return value  (NULL_RETURNS)
/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/row/TestPrefixTreeSearcher.java:
215 in org.apache.hadoop.hbase.codec.prefixtree.row.TestPrefixTreeSearcher.testSeekWithPrefix()()
209           searcher = DecoderFactory.checkOut(block, true);
210           // seek with half bytes of second row key, should return second row
211           KeyValue kv = rows.getInputs().get(1);
212           KeyValue firstKVOnRow = KeyValueUtil.createFirstOnRow(Arrays.copyOfRange(
213               kv.getRowArray(), kv.getRowOffset(),
214               kv.getRowOffset() + kv.getRowLength() / 2));
>>>     CID 1243674:  Dereference null return value  (NULL_RETURNS)
>>>     Calling a method on null object "searcher".
215           CellScannerPosition position = searcher.positionAtOrAfter(firstKVOnRow);
216           Assert.assertEquals(CellScannerPosition.AFTER, position);
217           Assert.assertEquals(kv, searcher.current());
218         } finally {
219           DecoderFactory.checkIn(searcher);
220         }
221       }

________________________________________________________________________________________________________
*** CID 1243615:  Unused value  (UNUSED_VALUE)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: 5450 in org.apache.hadoop.hbase.regionserver.HRegion.append(org.apache.hadoop.hbase.client.Append,
long, long)()
5444                 } else {
5445                   // otherwise keep older versions around
5446                   for (Cell cell: entry.getValue()) {
5447                     Pair<Long, Cell> ret = store.add(cell);
5448                     size += ret.getFirst();
5449                     memstoreCells.add(ret.getSecond());
>>>     CID 1243615:  Unused value  (UNUSED_VALUE)
>>>     Value "true" is assigned to "doRollBackMemstore" here, but that stored value
is not used before it is overwritten.
5450                     doRollBackMemstore = true;
5451                   }
5452                 }
5453                 allKVs.addAll(entry.getValue());
5454               }
5455     

________________________________________________________________________________________________________
*** CID 1243629:  AT: Possible atomicity violation  (FB.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: 2076 in
org.apache.hadoop.hbase.master.AssignmentManager.onRegionFailedOpen(org.apache.hadoop.hbase.master.RegionState,
org.apache.hadoop.hbase.HRegionInfo, org.apache.hadoop.hbase.ServerName)()
2070         AtomicInteger failedOpenCount = failedOpenTracker.get(encodedName);
2071         if (failedOpenCount == null) {
2072           failedOpenCount = new AtomicInteger();
2073           // No need to use putIfAbsent, or extra synchronization since
2074           // this whole handleRegion block is locked on the encoded region
2075           // name, and failedOpenTracker is updated only in this block
>>>     CID 1243629:  AT: Possible atomicity violation  (FB.AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION)
>>>     Sequence of calls to java.util.concurrent.ConcurrentHashMap may not be atomic.
2076           failedOpenTracker.put(encodedName, failedOpenCount);
2077         }
2078         if (failedOpenCount.incrementAndGet() >= maximumAttempts) {
2079           regionStates.updateRegionState(hri, State.FAILED_OPEN);
2080           // remove the tracking info to save memory, also reset
2081           // the count for next open initiative

________________________________________________________________________________________________________
*** CID 1243621:  Dm: Dubious method used  (FB.DM_DEFAULT_ENCODING)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java: 2583
in org.apache.hadoop.hbase.regionserver.HRegionServer.closeRegion(java.lang.String, boolean,
org.apache.hadoop.hbase.ServerName)()
2577             ", which we are already trying to CLOSE, but not completed yet");
2578           return true;
2579         }
2580     
2581         if (actualRegion == null) {
2582           LOG.error("Received CLOSE for a region which is not online, and we're not opening.");
>>>     CID 1243621:  Dm: Dubious method used  (FB.DM_DEFAULT_ENCODING)
>>>     Another occurrence here
2583           this.regionsInTransitionInRS.remove(encodedName.getBytes());
2584           // The master deletes the znode when it receives this exception.
2585           throw new NotServingRegionException("The region " + encodedName +
2586               " is not online, and is not opening.");
2587         }
2588     

________________________________________________________________________________________________________
*** CID 1243609:  MWN: Mismatched wait() or notify()  (FB.MWN_MISMATCHED_NOTIFY)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java: 1761
in org.apache.hadoop.hbase.regionserver.wal.HLogSplitter$LogReplayOutputSink.flush()()
1755               this.serverToBufferQueueMap.remove(curLoc);
1756             }
1757           }
1758     
1759           if (curSize > 0) {
1760             this.processWorkItems(curLoc, curQueue);
>>>     CID 1243609:  MWN: Mismatched wait() or notify()  (FB.MWN_MISMATCHED_NOTIFY)
>>>     Mismatched notify().
1761             controller.dataAvailable.notifyAll();
1762             return true;
1763           }
1764           return false;
1765         }
1766     

________________________________________________________________________________________________________
*** CID 1243595:  RV: Bad use of return value  (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java:
147 in org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionEnvironment.offerExecutionLatency(long)()
141         @Override
142         public ConcurrentMap<String, Object> getSharedData() {
143           return sharedData;
144         }
145     
146         public void offerExecutionLatency(long latencyNanos) {
>>>     CID 1243595:  RV: Bad use of return value  (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
>>>     Exceptional return value of java.util.concurrent.BlockingQueue.offer(Object)
ignored.
147           coprocessorTimeNanos.offer(latencyNanos);
148         }
149     
150         public Collection<Long> getExecutionLatenciesNanos() {
151           final List<Long> latencies = Lists.newArrayListWithCapacity(coprocessorTimeNanos.size());
152           coprocessorTimeNanos.drainTo(latencies);

________________________________________________________________________________________________________
*** CID 1243631:  UwF: Unwritten field  (FB.UWF_NULL_FIELD)
/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java:
101 in ()
95       private long resubmitThreshold;
96       private long timeout;
97       private TaskFinisher taskFinisher;
98     
99       SplitLogManagerDetails details;
100     
>>>     CID 1243631:  UwF: Unwritten field  (FB.UWF_NULL_FIELD)
>>>     Field only ever set to null: org.apache.hadoop.hbase.coordination.ZKSplitLogManagerCoordination.stopper.
101       private final Stoppable stopper = null;
102     
103       // When lastRecoveringNodeCreationTime is older than the following threshold, we'll
check
104       // whether to GC stale recovering znodes
105       private volatile long lastRecoveringNodeCreationTime = 0;
106       private Configuration conf;

________________________________________________________________________________________________________
*** CID 1066078:  RV: Bad use of return value  (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: 1916 in
org.apache.hadoop.hbase.master.AssignmentManager.invokeAssign(org.apache.hadoop.hbase.HRegionInfo)()
1910           return false;
1911         }
1912         return true;
1913       }
1914     
1915       void invokeAssign(HRegionInfo regionInfo) {
>>>     CID 1066078:  RV: Bad use of return value  (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
>>>     Exceptional return value of java.util.concurrent.ExecutorService.submit(Callable)
ignored.
1916         threadPoolExecutorService.submit(new AssignCallable(this, regionInfo));
1917       }
1918     
1919       void invokeUnAssign(HRegionInfo regionInfo) {
1920         threadPoolExecutorService.submit(new UnAssignCallable(this, regionInfo));
1921       }

________________________________________________________________________________________________________
*** CID 1114100:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java: 1277 in org.apache.hadoop.hbase.util.FSUtils.getTableDirs(org.apache.hadoop.fs.FileSystem,
org.apache.hadoop.fs.Path)()
1271           Configuration conf, CancelableProgressable reporter) throws IOException;
1272     
1273       public static List<Path> getTableDirs(final FileSystem fs, final Path rootdir)
1274           throws IOException {
1275         List<Path> tableDirs = new LinkedList<Path>();
1276     
>>>     CID 1114100:  Dereference null return value  (NULL_RETURNS)
>>>     Accessing length of null array "fs.globStatus(new org.apache.hadoop.fs.Path(rootdir,
new org.apache.hadoop.fs.Path("data", "*")))".
1277         for(FileStatus status :
1278             fs.globStatus(new Path(rootdir,
1279                 new Path(HConstants.BASE_NAMESPACE_DIR, "*")))) {
1280           tableDirs.addAll(FSUtils.getLocalTableDirs(fs, status.getPath()));
1281         }
1282         return tableDirs;

________________________________________________________________________________________________________
*** CID 1203014:  Resource leak on an exceptional path  (RESOURCE_LEAK)
/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java: 83 in
org.apache.hadoop.hbase.master.MasterStatusServlet.doGet(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)()
77           .setCatalogJanitorEnabled(master.isCatalogJanitorEnabled());
78     
79         if (request.getParameter("filter") != null)
80           tmpl.setFilter(request.getParameter("filter"));
81         if (request.getParameter("format") != null)
82           tmpl.setFormat(request.getParameter("format"));
>>>     CID 1203014:  Resource leak on an exceptional path  (RESOURCE_LEAK)
>>>     Variable "admin" going out of scope leaks the resource it refers to.
83         tmpl.render(response.getWriter(),
84               master, admin);
85       }
86     
87       private ServerName getMetaLocationOrNull(HMaster master) {
88         MetaTableLocator metaTableLocator = master.getMetaTableLocator();

________________________________________________________________________________________________________
*** CID 1203004:  Explicit null dereferenced  (FORWARD_NULL)
/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableRecordReaderImpl.java: 232
in org.apache.hadoop.hbase.mapred.TableRecordReaderImpl.next(org.apache.hadoop.hbase.io.ImmutableBytesWritable,
org.apache.hadoop.hbase.client.Result)()
226             if (lastSuccessfulRow == null) {
227               restart(startRow);
228             } else {
229               restart(lastSuccessfulRow);
230               this.scanner.next();    // skip presumed already mapped row
231             }
>>>     CID 1203004:  Explicit null dereferenced  (FORWARD_NULL)
>>>     "next" dereferences null "this.scanner.callable". (The virtual call resolves
to "org.apache.hadoop.hbase.client.ClientScanner.next".)
232             result = this.scanner.next();
233           }
234     
235           if (result != null && result.size() > 0) {
236             key.set(result.getRow());
237             lastSuccessfulRow = key.get();

________________________________________________________________________________________________________
*** CID 1203001:  Explicit null dereferenced  (FORWARD_NULL)
/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java:
235 in org.apache.hadoop.hbase.mapreduce.TableRecordReaderImpl.nextKeyValue()()
229             if (lastSuccessfulRow == null) {
230               restart(scan.getStartRow());
231             } else {
232               restart(lastSuccessfulRow);
233               scanner.next();    // skip presumed already mapped row
234             }
>>>     CID 1203001:  Explicit null dereferenced  (FORWARD_NULL)
>>>     "next" dereferences null "scanner.callable". (The virtual call resolves to
"org.apache.hadoop.hbase.client.ClientScanner.next".)
235             value = scanner.next();
236             if (value != null && value.isStale()) numStale++;
237             numRestarts++;
238           }
239           if (value != null && value.size() > 0) {
240             key.set(value.getRow());

________________________________________________________________________________________________________
*** CID 1064859:  Unguarded write  (GUARDED_BY_VIOLATION)
/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java:
349 in org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager.preLogRoll(org.apache.hadoop.fs.Path)()
343               hlogs.clear();
344             }
345             hlogs.add(name);
346           }
347         }
348     
>>>     CID 1064859:  Unguarded write  (GUARDED_BY_VIOLATION)
>>>     Accessing "this.latestPath" without holding lock "ReplicationSourceManager.hlogsById".
Elsewhere, "org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager.latestPath"
is accessed with "ReplicationSourceManager.hlogsById" held 3 out of 4 times.
349         this.latestPath = newLog;
350       }
351     
352       void postLogRoll(Path newLog) throws IOException {
353         // This only updates the sources we own, not the recovered ones
354         for (ReplicationSourceInterface source : this.sources) {

________________________________________________________________________________________________________
*** CID 1064941:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java:
281 in org.apache.hadoop.hbase.replication.regionserver.ReplicationSource.run()()
275         LOG.info("Replicating "+clusterId + " -> " + peerClusterId);
276     
277         // If this is recovered, the queue is already full and the first log
278         // normally has a position (unless the RS failed between 2 logs)
279         if (this.replicationQueueInfo.isQueueRecovered()) {
280           try {
>>>     CID 1064941:  Dereference null return value  (NULL_RETURNS)
>>>     Calling a method on null object "this.queue.peek()".
281             this.repLogReader.setPosition(this.replicationQueues.getLogPosition(this.peerClusterZnode,
282               this.queue.peek().getName()));
283             if (LOG.isTraceEnabled()) {
284               LOG.trace("Recovered queue started with log " + this.queue.peek() +
285                   " at position " + this.repLogReader.getPosition());
286             }

________________________________________________________________________________________________________
*** CID 1090441:  Dereference after null check  (FORWARD_NULL)
/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java:
139 in org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication$Verifier.map(org.apache.hadoop.hbase.io.ImmutableBytesWritable,
org.apache.hadoop.hbase.client.Result, org.apache.hadoop.mapreduce.Mapper$Context)()
133                 scan.setStartRow(value.getRow());
134                 scan.setStopRow(tableSplit.getEndRow());
135                 replicatedScanner = replicatedTable.getScanner(scan);
136                 return null;
137               }
138             });
>>>     CID 1090441:  Dereference after null check  (FORWARD_NULL)
>>>     Calling a method on null object "replicatedScanner".
139             currentCompareRowInPeerTable = replicatedScanner.next();
140           }
141           while (true) {
142             if (currentCompareRowInPeerTable == null) {
143               // reach the region end of peer table, row only in source table
144               logFailRowAndIncreaseCounter(context, Counters.ONLY_IN_SOURCE_TABLE_ROWS,
value);

________________________________________________________________________________________________________
*** CID 1064970:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java:
163 in org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint.prepareBulkLoad(com.google.protobuf.RpcController,
org.apache.hadoop.hbase.protobuf.generated.SecureBulkLoadProtos$PrepareBulkLoadRequest, com.google.protobuf.RpcCallback)()
157                                                      PrepareBulkLoadRequest request,
158                                                      RpcCallback<PrepareBulkLoadResponse>
done){
159         try {
160           if(userProvider.isHBaseSecurityEnabled()) {
161             getAccessController().prePrepareBulkLoad(env);
162           }
>>>     CID 1064970:  Dereference null return value  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "getActiveUser()" when calling
"createStagingDir".
163           String bulkToken = createStagingDir(baseStagingDir,
164               getActiveUser(), ProtobufUtil.toTableName(request.getTableName())).toString();
165           done.run(PrepareBulkLoadResponse.newBuilder().setBulkToken(bulkToken).build());
166         } catch (IOException e) {
167           ResponseConverter.setControllerException(controller, e);
168         }

________________________________________________________________________________________________________
*** CID 1064964:  Dereference null return value  (NULL_RETURNS)
/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java: 372 in
org.apache.hadoop.hbase.migration.NamespaceUpgrade.migrateACL()()
366         }
367     
368         LOG.info("Migrating ACL table");
369     
370         TableName newTableName = AccessControlLists.ACL_TABLE_NAME;
371         Path newTablePath = FSUtils.getTableDir(rootDir, newTableName);
>>>     CID 1064964:  Dereference null return value  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "org.apache.hadoop.hbase.migration.NamespaceUpgrade.getCurrentTableInfoStatus(fs,
oldTablePath)" when calling "readTableDescriptor".
372         HTableDescriptor oldDesc =
373             readTableDescriptor(fs, getCurrentTableInfoStatus(fs, oldTablePath));
374     
375         if(FSTableDescriptors.getTableInfoPath(fs, newTablePath) == null) {
376           LOG.info("Creating new tableDesc for ACL");
377           HTableDescriptor newDesc = new HTableDescriptor(oldDesc);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/728?tab=overview

To unsubscribe from the email notification for new defects, http://scan5.coverity.com/cgi-bin/unsubscribe.py




Mime
View raw message