[GitHub] alerman commented on a change in pull request #524: Add end row to Volume Chooser environment to enable decisions based on tablet

2018-09-27 Thread GitBox
alerman commented on a change in pull request #524: Add end row to Volume 
Chooser environment to enable decisions based on tablet
URL: https://github.com/apache/accumulo/pull/524#discussion_r221022513
 
 

 ##
 File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
 ##
 @@ -2842,17 +2843,19 @@ public AtomicLong getScannedCounter() {
   }
 
   private static String createTabletDirectory(ServerContext context, 
VolumeManager fs,
-  Table.ID tableId, Text endRow) {
+  Table.ID tableId, KeyExtent extent) {
 String lowDirectory;
 
 UniqueNameAllocator namer = context.getUniqueNameAllocator();
-VolumeChooserEnvironment chooserEnv = new 
VolumeChooserEnvironment(tableId, context);
+
+VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironment(tableId,
+new TabletIdImpl(extent), context);
 String volume = fs.choose(chooserEnv, 
ServerConstants.getBaseUris(context.getConfiguration()))
 + Constants.HDFS_TABLES_DIR + Path.SEPARATOR;
 
 while (true) {
   try {
-if (endRow == null) {
+if (extent.getEndRow() == null) {
 
 Review comment:
   Same as above. Now that I am passing the extent down, we need to get the 
endrow as that is what we wanted. I can move the getEndRow call up and set it 
to a local variable if you would prefer


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alerman commented on a change in pull request #524: Add end row to Volume Chooser environment to enable decisions based on tablet

2018-09-27 Thread GitBox
alerman commented on a change in pull request #524: Add end row to Volume 
Chooser environment to enable decisions based on tablet
URL: https://github.com/apache/accumulo/pull/524#discussion_r221022513
 
 

 ##
 File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
 ##
 @@ -2842,17 +2843,19 @@ public AtomicLong getScannedCounter() {
   }
 
   private static String createTabletDirectory(ServerContext context, 
VolumeManager fs,
-  Table.ID tableId, Text endRow) {
+  Table.ID tableId, KeyExtent extent) {
 String lowDirectory;
 
 UniqueNameAllocator namer = context.getUniqueNameAllocator();
-VolumeChooserEnvironment chooserEnv = new 
VolumeChooserEnvironment(tableId, context);
+
+VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironment(tableId,
+new TabletIdImpl(extent), context);
 String volume = fs.choose(chooserEnv, 
ServerConstants.getBaseUris(context.getConfiguration()))
 + Constants.HDFS_TABLES_DIR + Path.SEPARATOR;
 
 while (true) {
   try {
-if (endRow == null) {
+if (extent.getEndRow() == null) {
 
 Review comment:
   Same as above. Now that I am passing the extent down, we need to get the 
endrow as that is what we wanted. I can mover the getEndRow call up and set it 
to a local variable if you would prefer


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alerman commented on a change in pull request #524: Add end row to Volume Chooser environment to enable decisions based on tablet

2018-09-27 Thread GitBox
alerman commented on a change in pull request #524: Add end row to Volume 
Chooser environment to enable decisions based on tablet
URL: https://github.com/apache/accumulo/pull/524#discussion_r221022591
 
 

 ##
 File path: 
server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooserEnvironment.java
 ##
 @@ -35,17 +38,37 @@
   private final ServerContext context;
   private final ChooserScope scope;
   private final Table.ID tableId;
+  private final TabletId tabletId;
 
   public VolumeChooserEnvironment(ChooserScope scope, ServerContext context) {
 this.context = context;
 this.scope = Objects.requireNonNull(scope);
 this.tableId = null;
+tabletId = null;
+  }
+
+  @VisibleForTesting
+  public VolumeChooserEnvironment(Table.ID tableId) {
 
 Review comment:
   Fixed in next commit


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alerman commented on a change in pull request #524: Add end row to Volume Chooser environment to enable decisions based on tablet

2018-09-27 Thread GitBox
alerman commented on a change in pull request #524: Add end row to Volume 
Chooser environment to enable decisions based on tablet
URL: https://github.com/apache/accumulo/pull/524#discussion_r221022602
 
 

 ##
 File path: 
server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooserEnvironment.java
 ##
 @@ -35,17 +38,37 @@
   private final ServerContext context;
   private final ChooserScope scope;
   private final Table.ID tableId;
+  private final TabletId tabletId;
 
   public VolumeChooserEnvironment(ChooserScope scope, ServerContext context) {
 this.context = context;
 this.scope = Objects.requireNonNull(scope);
 this.tableId = null;
+tabletId = null;
+  }
+
+  @VisibleForTesting
+  public VolumeChooserEnvironment(Table.ID tableId) {
+this(tableId, null, null);
   }
 
   public VolumeChooserEnvironment(Table.ID tableId, ServerContext context) {
+this.scope = ChooserScope.TABLE;
+this.context = context;
+this.tableId = Objects.requireNonNull(tableId);
 
 Review comment:
   Fixed in next commit


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alerman commented on a change in pull request #524: Add end row to Volume Chooser environment to enable decisions based on tablet

2018-09-27 Thread GitBox
alerman commented on a change in pull request #524: Add end row to Volume 
Chooser environment to enable decisions based on tablet
URL: https://github.com/apache/accumulo/pull/524#discussion_r221022239
 
 

 ##
 File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
 ##
 @@ -2298,7 +2299,7 @@ public boolean isMajorCompactionQueued() {
   KeyExtent high = new KeyExtent(extent.getTableId(), extent.getEndRow(), 
midRow);
 
   String lowDirectory = createTabletDirectory(context, 
getTabletServer().getFileSystem(),
-  extent.getTableId(), midRow);
 
 Review comment:
   This was changed to allow passing the extent down to use the new 
constructor. Because of earlier requested changes the value passed to the 
VolumeChooserEnvironment is a TabletId, which takes an extent


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alerman commented on a change in pull request #524: Add end row to Volume Chooser environment to enable decisions based on tablet

2018-06-13 Thread GitBox
alerman commented on a change in pull request #524: Add end row to Volume 
Chooser environment to enable decisions based on tablet
URL: https://github.com/apache/accumulo/pull/524#discussion_r195073537
 
 

 ##
 File path: 
server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooserEnvironment.java
 ##
 @@ -33,15 +34,29 @@
 
   private final ChooserScope scope;
   private final Table.ID tableId;
+  private final Text endRow;
 
   public VolumeChooserEnvironment(ChooserScope scope) {
 this.scope = Objects.requireNonNull(scope);
 this.tableId = null;
+endRow = null;
   }
 
   public VolumeChooserEnvironment(Table.ID tableId) {
 this.scope = ChooserScope.TABLE;
 this.tableId = Objects.requireNonNull(tableId);
+endRow = null;
+  }
+
+  public VolumeChooserEnvironment(Table.ID tableId, Text endRow) {
 
 Review comment:
   Switched to the TabletId and pushed up.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services