You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2021/05/03 14:32:07 UTC

Change in asterixdb[cheshire-cat]: WIP: dump index function

From Ali Alsuliman <al...@gmail.com>:

Ali Alsuliman has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304 )


Change subject: WIP: dump index function
......................................................................

WIP: dump index function

Change-Id: I5e03ebda863a2b6c65e9440c3feaf683f5d1ce1e
---
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
2 files changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/04/11304/1

diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
index 2fdbef3..85f77ed 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
@@ -50,6 +50,6 @@
             throws HyracksDataException {
         INCServiceContext serviceCtx = ctx.getJobletContext().getServiceContext();
         final IIndexDataflowHelper indexDataflowHelper = indexDataflowHelperFactory.create(serviceCtx, partition);
-        return new DumpIndexReader(indexDataflowHelper, recDesc, comparatorFactories);
+        return new DumpIndexReader(indexDataflowHelper, recDesc, comparatorFactories, partition);
     }
 }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
index 2a22ac6..cc48039 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
@@ -42,6 +42,7 @@
     private final CharArrayRecord record;
     private final IIndexCursor searchCursor;
     private final RecordDescriptor secondaryRecDesc;
+    private final int partition;
     private final StringBuilder recordBuilder = new StringBuilder();
     private final ByteBufferInputStream bbis = new ByteBufferInputStream();
     private final DataInputStream dis = new DataInputStream(bbis);
@@ -49,9 +50,10 @@
     private final IIndexAccessor accessor;
 
     public DumpIndexReader(IIndexDataflowHelper indexDataflowHelper, RecordDescriptor secondaryRecDesc,
-            IBinaryComparatorFactory[] comparatorFactories) throws HyracksDataException {
+            IBinaryComparatorFactory[] comparatorFactories, int partition) throws HyracksDataException {
         this.indexDataflowHelper = indexDataflowHelper;
         this.secondaryRecDesc = secondaryRecDesc;
+        this.partition = partition;
         indexDataflowHelper.open();
         IIndex indexInstance = indexDataflowHelper.getIndexInstance();
         accessor = indexInstance.createAccessor(NoOpIndexAccessParameters.INSTANCE);
@@ -102,6 +104,6 @@
             recordBuilder.append(",");
         }
         recordBuilder.deleteCharAt(recordBuilder.length() - 1);
-        recordBuilder.append("]}");
+        recordBuilder.append("], \"partition\":").append(partition).append('}');
     }
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: cheshire-cat
Gerrit-Change-Id: I5e03ebda863a2b6c65e9440c3feaf683f5d1ce1e
Gerrit-Change-Number: 11304
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>
Gerrit-MessageType: newchange

Change in asterixdb[cheshire-cat]: WIP: dump index function

Posted by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu>.
From Ali Alsuliman <al...@gmail.com>:

Ali Alsuliman has abandoned this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304 )

Change subject: WIP: dump index function
......................................................................


Abandoned
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: cheshire-cat
Gerrit-Change-Id: I5e03ebda863a2b6c65e9440c3feaf683f5d1ce1e
Gerrit-Change-Number: 11304
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-MessageType: abandon

Change in asterixdb[cheshire-cat]: WIP: dump index function

Posted by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu>.
From Ali Alsuliman <al...@gmail.com>:

Ali Alsuliman has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304 )


Change subject: WIP: dump index function
......................................................................

WIP: dump index function

Change-Id: I5e03ebda863a2b6c65e9440c3feaf683f5d1ce1e
---
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
2 files changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/04/11304/1

diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
index 2fdbef3..85f77ed 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexFunction.java
@@ -50,6 +50,6 @@
             throws HyracksDataException {
         INCServiceContext serviceCtx = ctx.getJobletContext().getServiceContext();
         final IIndexDataflowHelper indexDataflowHelper = indexDataflowHelperFactory.create(serviceCtx, partition);
-        return new DumpIndexReader(indexDataflowHelper, recDesc, comparatorFactories);
+        return new DumpIndexReader(indexDataflowHelper, recDesc, comparatorFactories, partition);
     }
 }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
index 2a22ac6..cc48039 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/function/DumpIndexReader.java
@@ -42,6 +42,7 @@
     private final CharArrayRecord record;
     private final IIndexCursor searchCursor;
     private final RecordDescriptor secondaryRecDesc;
+    private final int partition;
     private final StringBuilder recordBuilder = new StringBuilder();
     private final ByteBufferInputStream bbis = new ByteBufferInputStream();
     private final DataInputStream dis = new DataInputStream(bbis);
@@ -49,9 +50,10 @@
     private final IIndexAccessor accessor;
 
     public DumpIndexReader(IIndexDataflowHelper indexDataflowHelper, RecordDescriptor secondaryRecDesc,
-            IBinaryComparatorFactory[] comparatorFactories) throws HyracksDataException {
+            IBinaryComparatorFactory[] comparatorFactories, int partition) throws HyracksDataException {
         this.indexDataflowHelper = indexDataflowHelper;
         this.secondaryRecDesc = secondaryRecDesc;
+        this.partition = partition;
         indexDataflowHelper.open();
         IIndex indexInstance = indexDataflowHelper.getIndexInstance();
         accessor = indexInstance.createAccessor(NoOpIndexAccessParameters.INSTANCE);
@@ -102,6 +104,6 @@
             recordBuilder.append(",");
         }
         recordBuilder.deleteCharAt(recordBuilder.length() - 1);
-        recordBuilder.append("]}");
+        recordBuilder.append("], \"partition\":").append(partition).append('}');
     }
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: cheshire-cat
Gerrit-Change-Id: I5e03ebda863a2b6c65e9440c3feaf683f5d1ce1e
Gerrit-Change-Number: 11304
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>
Gerrit-MessageType: newchange

Change in asterixdb[cheshire-cat]: WIP: dump index function

Posted by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu>.
From Jenkins <je...@fulliautomatix.ics.uci.edu>:

Jenkins has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304 )

Change subject: WIP: dump index function
......................................................................


Patch Set 1: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/11939/ : UNSTABLE


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11304
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: cheshire-cat
Gerrit-Change-Id: I5e03ebda863a2b6c65e9440c3feaf683f5d1ce1e
Gerrit-Change-Number: 11304
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Comment-Date: Mon, 03 May 2021 15:34:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment