You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/04/28 16:25:30 UTC

[GitHub] [accumulo] keith-turner commented on a diff in pull request #3355: Remove deprecated reserveMapFileReader

keith-turner commented on code in PR #3355:
URL: https://github.com/apache/accumulo/pull/3355#discussion_r1180603488


##########
core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/MapFileIterator.java:
##########
@@ -124,14 +125,15 @@ public Value getTopValue() {
   @Override
   public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
     try {
-      @SuppressWarnings("deprecation")
-      SortedKeyValueIterator<Key,Value> other = env.reserveMapFileReader(dirName);
-      ((InterruptibleIterator) other).setInterruptFlag(interruptFlag);
+      Configuration hadoopConf = new Configuration();
+      FileSystem fs = FileSystem.get(hadoopConf);

Review Comment:
   Should keep teh config and filesystem objects passed into the constructor instead of creating new ones here.



##########
core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/MapFileIterator.java:
##########
@@ -124,14 +125,15 @@ public Value getTopValue() {
   @Override
   public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
     try {
-      @SuppressWarnings("deprecation")
-      SortedKeyValueIterator<Key,Value> other = env.reserveMapFileReader(dirName);
-      ((InterruptibleIterator) other).setInterruptFlag(interruptFlag);
+      Configuration hadoopConf = new Configuration();
+      FileSystem fs = FileSystem.get(hadoopConf);

Review Comment:
   Should keep the config and filesystem objects passed into the constructor instead of creating new ones here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org