return; final long writeId = parsedBase.getWriteId(); if(bestBase.oldestBaseWriteId > writeId) {
.setOldStyle(false) .minimumWriteId(0) .maximumWriteId(ParsedBase.parseBase(bucketFile.getParent()).getWriteId()) .bucket(bucket) .writingBase(true);
if(isBase || isDelta) { if(isBase) { return new TransactionMetaData(AcidUtils.ParsedBase.parseBase(parent).getWriteId(), parent);
if(mergerOptions.getBaseDir().getName().startsWith(AcidUtils.BASE_PREFIX)) { readerPairOptions = modifyForNonAcidSchemaRead(mergerOptions, AcidUtils.ParsedBase.parseBase(mergerOptions.getBaseDir()).getWriteId(), mergerOptions.getBaseDir());
new byte[0])); assertEquals(123, AcidUtils.ParsedBase.parseBase(new Path("/tmp/base_000123")).getWriteId()); assertEquals(0, AcidUtils.ParsedBase.parseBase(new Path("/tmp/base_000123")).getVisibilityTxnId());
/** * We can only use a 'base' if it doesn't have an open txn (from specific reader's point of view) * A 'base' with open txn in its range doesn't have 'enough history' info to produce a correct * snapshot for this reader. * Note that such base is NOT obsolete. Obsolete files are those that are "covered" by other * files within the snapshot. * A base produced by Insert Overwrite is different. Logically it's a delta file but one that * causes anything written previously to be ignored (hence the overwrite). In this case, base_x * is visible if writeid:x is committed for current reader. */ private static boolean isValidBase(ParsedBase parsedBase, ValidWriteIdList writeIdList, FileSystem fs) throws IOException { if(parsedBase.getWriteId() == Long.MIN_VALUE) { //such base is created by 1st compaction in case of non-acid to acid table conversion //By definition there are no open txns with id < 1. return true; } if(isCompactedBase(parsedBase, fs)) { return writeIdList.isValidBase(parsedBase.getWriteId()); } //if here, it's a result of IOW return writeIdList.isWriteIdValid(parsedBase.getWriteId()); } /**