>From Michael Blow <[email protected]>:
Michael Blow has submitted this change. (
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20468?usp=email )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted
one.
)Change subject: Merge branch 'gerrit/trinity' into 'gerrit/phoenix'
......................................................................
Merge branch 'gerrit/trinity' into 'gerrit/phoenix'
* [NO ISSUE][*DB][EXT] Make IDataParser extend Closeable, misc
* [NO ISSUE][EXT]: Use ABFSS instead of deprecated WASBS
* [NO ISSUE][*DB][STO] Fix IndexOutOfBoundsException removing last page...
Ext-ref: MB-67819
Change-Id: I49f69c95163d54b4c199f234291047fd01c27775
---
M
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordConverter.java
M
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
3 files changed, 17 insertions(+), 27 deletions(-)
Approvals:
Michael Blow: Looks good to me, approved; Verified
diff --git
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordConverter.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordConverter.java
index b14e653..792fb4c 100644
---
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordConverter.java
+++
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordConverter.java
@@ -22,24 +22,11 @@
import java.io.IOException;
@FunctionalInterface
-<<<<<<< HEAD (384570 [ASTERIXDB-3392][EXT] Default to STRING for null-typed
field)
-public interface IRecordConverter<I, O> {
- O convert(IRawRecord<? extends I> input) throws IOException;
-=======
public interface IRecordConverter<I, O> extends Closeable {
O convert(IRawRecord<? extends I> input) throws IOException;
- /**
- * Configures the converter with information suppliers from the {@link
IRecordReader} data source.
- *
- * @param lineNumber line number supplier
- */
- default void configure(LongSupplier lineNumber) {
- }
-
default void close() {
// default no-op
}
->>>>>>> BRANCH (e27f6f Merge branch 'gerrit/neo' into 'gerrit/trinity')
}
diff --git
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
index c338d9e..09b2cec 100644
---
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
+++
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
@@ -19,14 +19,11 @@
package org.apache.hyracks.storage.am.lsm.common.impls;
-<<<<<<< HEAD (384570 [ASTERIXDB-3392][EXT] Default to STRING for null-typed
field)
import static
org.apache.hyracks.util.ExitUtil.EC_INCONSISTENT_STORAGE_REFERENCES;
-=======
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
->>>>>>> BRANCH (e27f6f Merge branch 'gerrit/neo' into 'gerrit/trinity')
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -152,9 +149,7 @@
int numEntered = 0;
boolean entranceSuccessful = false;
try {
- final int componentsCount = components.size();
- for (int i = 0; i < componentsCount; i++) {
- final ILSMComponent component = components.get(i);
+ for (final ILSMComponent component : components) {
boolean isMutableComponent = numEntered == 0 &&
component.getType() == LSMComponentType.MEMORY;
if (!component.threadEnter(opType, isMutableComponent)) {
if (dumpState) {
@@ -276,7 +271,7 @@
cleanupInactiveMemoryComponents(inactiveMemoryComponentsToBeCleanedUp);
}
if (opType == LSMOperationType.FLUSH && !failedOperation) {
- ILSMMemoryComponent flushingComponent = (ILSMMemoryComponent)
ctx.getComponentHolder().get(0);
+ ILSMMemoryComponent flushingComponent = (ILSMMemoryComponent)
ctx.getComponentHolder().getFirst();
// We must call flushed without synchronizing on opTracker to
avoid deadlocks
flushingComponent.flushed();
}
@@ -391,7 +386,7 @@
}
getAndEnterComponents(ctx, LSMOperationType.MODIFICATION, false);
try {
- AbstractLSMMemoryComponent c = (AbstractLSMMemoryComponent)
ctx.getComponentHolder().get(0);
+ AbstractLSMMemoryComponent c = (AbstractLSMMemoryComponent)
ctx.getComponentHolder().getFirst();
c.getMetadata().put(key, value);
c.setModified();
} finally {
@@ -415,7 +410,7 @@
}
getAndEnterComponents(ctx, LSMOperationType.FORCE_MODIFICATION, false);
try {
- AbstractLSMMemoryComponent c = (AbstractLSMMemoryComponent)
ctx.getComponentHolder().get(0);
+ AbstractLSMMemoryComponent c = (AbstractLSMMemoryComponent)
ctx.getComponentHolder().getFirst();
c.getMetadata().put(key, value);
c.setModified();
} finally {
@@ -435,7 +430,8 @@
try {
lsmIndex.modify(ctx, tuple);
// The mutable component is always in the first index.
- AbstractLSMMemoryComponent mutableComponent =
(AbstractLSMMemoryComponent) ctx.getComponentHolder().get(0);
+ AbstractLSMMemoryComponent mutableComponent =
+ (AbstractLSMMemoryComponent)
ctx.getComponentHolder().getFirst();
mutableComponent.setModified();
} catch (Exception e) {
failedOperation = true;
@@ -593,10 +589,10 @@
}
private static String threadName(ILSMIOOperation operation) {
- if (operation.getIOOpertionType() == LSMIOOperationType.NOOP) {
- return String.valueOf(operation.getIOOpertionType());
+ if (operation.getIOOperationType() == LSMIOOperationType.NOOP) {
+ return String.valueOf(operation.getIOOperationType());
}
- return operation.getIOOpertionType() + ":" +
operation.getTarget().getRelativePath() + "@"
+ return operation.getIOOperationType() + ":" +
operation.getTarget().getRelativePath() + "@"
+ OP_THREAD_TIMESTAMP.format(ZonedDateTime.now());
}
@@ -802,7 +798,7 @@
@Override
public void deleteComponents(ILSMIndexOperationContext ctx,
Predicate<ILSMComponent> predicate)
throws HyracksDataException {
- ILSMIOOperation ioOperation = null;
+ ILSMIOOperation ioOperation;
// We need to always start the component delete from current memory
component.
// This will ensure Primary and secondary component id still matches
after component delete
if (!lsmIndex.isMemoryComponentsAllocated()) {
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20468?usp=email
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: asterixdb
Gerrit-Branch: phoenix
Gerrit-Change-Id: I49f69c95163d54b4c199f234291047fd01c27775
Gerrit-Change-Number: 20468
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>