>From Ayush Tripathi <[email protected]>:

Ayush Tripathi has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19293 )


Change subject: [NO ISSUE][EXT]: using location constraint from the 
IDataPartitioningProvider instead of cluster state manager.
......................................................................

[NO ISSUE][EXT]: using location constraint from the IDataPartitioningProvider 
instead of cluster state manager.

- user model changes: no
- storage format changes: no
- interface changes: no

Change-Id: I9ba2ce7afc54ddd08f5e522627c56e44f51cdbbc
---
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/delta/DeltaReaderFactory.java
1 file changed, 15 insertions(+), 4 deletions(-)



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

diff --git 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/delta/DeltaReaderFactory.java
 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/delta/DeltaReaderFactory.java
index dc4c310..8b5536d 100644
--- 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/delta/DeltaReaderFactory.java
+++ 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/delta/DeltaReaderFactory.java
@@ -30,7 +30,6 @@
 import java.util.PriorityQueue;
 import java.util.Set;

-import org.apache.asterix.common.cluster.IClusterStateManager;
 import org.apache.asterix.common.dataflow.ICcApplicationContext;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.exceptions.ErrorCode;
@@ -153,9 +152,7 @@

     private AlgebricksAbsolutePartitionConstraint 
configureLocationConstraints(ICcApplicationContext appCtx,
             List<Row> scanFiles) {
-        IClusterStateManager csm = appCtx.getClusterStateManager();
-
-        String[] locations = csm.getClusterLocations().getLocations();
+        String[] locations = 
appCtx.getDataPartitioningProvider().getClusterLocations().getLocations();
         if (scanFiles.size() == 0) {
             return 
AlgebricksAbsolutePartitionConstraint.randomLocation(locations);
         } else if (locations.length > scanFiles.size()) {
@@ -166,6 +163,7 @@
             ArrayUtils.shuffle(locationCopy);
             locations = ArrayUtils.subarray(locationCopy, 0, scanFiles.size());
         }
+
         return new AlgebricksAbsolutePartitionConstraint(locations);
     }


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I9ba2ce7afc54ddd08f5e522627c56e44f51cdbbc
Gerrit-Change-Number: 19293
Gerrit-PatchSet: 1
Gerrit-Owner: Ayush Tripathi <[email protected]>
Gerrit-MessageType: newchange

Reply via email to