Details
Description
Dodgy code Warnings Code Warning UC Useless condition: it's known that major == true at this point Bug type UC_USELESS_CONDITION (click for details) In class org.apache.hadoop.hbase.mob.DefaultMobStoreCompactor In method org.apache.hadoop.hbase.mob.DefaultMobStoreCompactor.performCompaction(Compactor$FileDetails, InternalScanner, CellSink, long, boolean, ThroughputController, boolean, int) Value major == true Unreachable code at DefaultMobStoreCompactor.java:[line 210] At DefaultMobStoreCompactor.java:[line 210]
if (major) { try { delFileWriter = mobStore.createDelFileWriterInTmp(new Date(fd.latestPutTs), fd.maxKeyCount, major ? majorCompactionCompression : minorCompactionCompression, store.getRegionInfo().getStartKey()); } catch (IOException e) { LOG.warn( "Failed to create del writer, " + "we will continue the compaction by writing delete markers directly in store files", e); } }
The 'major ? majorCompactionCompression : minorCompactionCompression' is useless as we have a 'if (major)' test above.
Attachments
Issue Links
- links to