fluo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [1/3] incubator-fluo git commit: fixes #688 update Fluo to use new parent pom
Date Fri, 22 Jul 2016 14:25:08 GMT
Repository: incubator-fluo
Updated Branches:
  refs/heads/master 8944203df -> 8316f94f5


fixes #688 update Fluo to use new parent pom


Project: http://git-wip-us.apache.org/repos/asf/incubator-fluo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fluo/commit/d4dddf52
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fluo/tree/d4dddf52
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fluo/diff/d4dddf52

Branch: refs/heads/master
Commit: d4dddf52d11573283a5a7d2c30a04820f0420c28
Parents: 8944203
Author: Keith Turner <kturner@apache.org>
Authored: Wed Jul 20 17:53:47 2016 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Wed Jul 20 17:54:06 2016 -0400

----------------------------------------------------------------------
 modules/accumulo/pom.xml                        |  2 +-
 .../fluo/accumulo/format/FluoFormatter.java     |  8 +--
 modules/api/pom.xml                             |  2 +-
 modules/cluster/pom.xml                         |  6 +-
 .../apache/fluo/cluster/runner/AppRunner.java   |  2 +-
 modules/core/pom.xml                            |  2 +-
 .../apache/fluo/core/impl/TransactionImpl.java  |  3 +-
 .../org/apache/fluo/core/impl/TxStringUtil.java | 26 +--------
 .../fluo/core/impl/scanner/CellScannerImpl.java | 25 ++++-----
 .../core/impl/scanner/ColumnScannerImpl.java    | 23 +++-----
 .../fluo/core/impl/scanner/RowScannerImpl.java  | 11 +---
 .../fluo/core/log/TracingTransaction.java       | 44 +++------------
 .../fluo/core/worker/TabletInfoCache.java       |  2 +-
 .../fluo/core/worker/finder/hash/ScanTask.java  |  2 +-
 modules/distribution/pom.xml                    |  2 +-
 modules/integration/pom.xml                     |  2 +-
 .../impl/GarbageCollectionIteratorIT.java       |  3 +-
 .../apache/fluo/integration/impl/ScannerIT.java | 58 +++-----------------
 .../fluo/integration/impl/StochasticBankIT.java |  2 +-
 modules/mapreduce/pom.xml                       |  2 +-
 modules/mini/pom.xml                            |  2 +-
 pom.xml                                         | 34 ++----------
 22 files changed, 59 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/accumulo/pom.xml
----------------------------------------------------------------------
diff --git a/modules/accumulo/pom.xml b/modules/accumulo/pom.xml
index 9351bc9..e480c98 100644
--- a/modules/accumulo/pom.xml
+++ b/modules/accumulo/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java
----------------------------------------------------------------------
diff --git a/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java
b/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java
index 697347c..056fa8d 100644
--- a/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java
+++ b/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java
@@ -17,7 +17,6 @@ package org.apache.fluo.accumulo.format;
 
 import java.util.Map.Entry;
 
-import com.google.common.base.Function;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
@@ -32,7 +31,7 @@ import org.apache.fluo.api.data.Column;
 /**
  * Converts Accumulo table data to a human-readable Fluo format
  */
-public class FluoFormatter implements Function<Entry<Key, Value>, String> {
+public class FluoFormatter {
 
   private static void appendByte(StringBuilder sb, byte b) {
     if (b >= 32 && b <= 126 && b != '\\') {
@@ -139,9 +138,4 @@ public class FluoFormatter implements Function<Entry<Key, Value>,
String> {
       return sb.toString();
     }
   }
-
-  @Override
-  public String apply(Entry<Key, Value> input) {
-    return toString(input);
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/api/pom.xml
----------------------------------------------------------------------
diff --git a/modules/api/pom.xml b/modules/api/pom.xml
index 83078d7..58b2e37 100644
--- a/modules/api/pom.xml
+++ b/modules/api/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/cluster/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cluster/pom.xml b/modules/cluster/pom.xml
index cf2a75b..6892856 100644
--- a/modules/cluster/pom.xml
+++ b/modules/cluster/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
@@ -65,10 +65,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.fluo</groupId>
-      <artifactId>fluo-accumulo</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.fluo</groupId>
       <artifactId>fluo-api</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/cluster/src/main/java/org/apache/fluo/cluster/runner/AppRunner.java
----------------------------------------------------------------------
diff --git a/modules/cluster/src/main/java/org/apache/fluo/cluster/runner/AppRunner.java b/modules/cluster/src/main/java/org/apache/fluo/cluster/runner/AppRunner.java
index d40ff9e..a984469 100644
--- a/modules/cluster/src/main/java/org/apache/fluo/cluster/runner/AppRunner.java
+++ b/modules/cluster/src/main/java/org/apache/fluo/cluster/runner/AppRunner.java
@@ -232,7 +232,7 @@ public abstract class AppRunner {
         }
       }
 
-      for (String entry : Iterables.transform(scanner, new FluoFormatter())) {
+      for (String entry : Iterables.transform(scanner, FluoFormatter::toString)) {
         System.out.println(entry);
       }
     } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 15d1b72..fda008d 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
index c4c429e..ca84807 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
@@ -241,7 +241,8 @@ public class TransactionImpl implements AsyncTransaction, Snapshot {
     Map<Column, Bytes> ret = new HashMap<>();
 
     Iterable<ColumnValue> scanner =
-        Iterables.transform(new SnapshotScanner(env, opts, startTs, stats), ColumnScannerImpl.E2CV);
+        Iterables.transform(new SnapshotScanner(env, opts, startTs, stats),
+            ColumnScannerImpl::entry2cv);
     for (ColumnValue cv : scanner) {
       if (shouldCopy) {
         if (columns.contains(cv.getColumn())) {

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/impl/TxStringUtil.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/impl/TxStringUtil.java b/modules/core/src/main/java/org/apache/fluo/core/impl/TxStringUtil.java
index 2682f96..a6111cf 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/TxStringUtil.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/TxStringUtil.java
@@ -21,7 +21,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import com.google.common.base.Function;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.Maps;
 import org.apache.fluo.api.client.SnapshotBase;
@@ -30,30 +29,11 @@ import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.data.RowColumn;
 
 public class TxStringUtil {
-
-
-  private static final Function<Bytes, String> B2S = new Function<Bytes, String>()
{
-
-    @Override
-    public String apply(Bytes input) {
-      return input.toString();
-    }
-  };
-
-  private static final Function<String, Bytes> S2B = new Function<String, Bytes>()
{
-
-    @Override
-    public Bytes apply(String input) {
-      return Bytes.of(input);
-    }
-  };
-
-
   private static Map<String, Map<Column, String>> transform(Map<Bytes, Map<Column,
Bytes>> rcvs) {
     Map<String, Map<Column, String>> ret = new HashMap<>(rcvs.size());
 
     for (Entry<Bytes, Map<Column, Bytes>> entry : rcvs.entrySet()) {
-      ret.put(entry.getKey().toString(), Maps.transformValues(entry.getValue(), B2S));
+      ret.put(entry.getKey().toString(), Maps.transformValues(entry.getValue(), b -> b.toString()));
     }
     return ret;
   }
@@ -68,12 +48,12 @@ public class TxStringUtil {
 
   public static Map<Column, String> gets(SnapshotBase snapshot, String row, Set<Column>
columns) {
     Map<Column, Bytes> values = snapshot.get(Bytes.of(row), columns);
-    return Maps.transformValues(values, B2S);
+    return Maps.transformValues(values, b -> b.toString());
   }
 
   public static Map<String, Map<Column, String>> gets(SnapshotBase snapshot,
       Collection<String> rows, Set<Column> columns) {
-    return transform(snapshot.get(Collections2.transform(rows, S2B), columns));
+    return transform(snapshot.get(Collections2.transform(rows, s -> Bytes.of(s)), columns));
   }
 
   public static Map<String, Map<Column, String>> gets(SnapshotBase snapshot,

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/CellScannerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/CellScannerImpl.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/CellScannerImpl.java
index 06e68d6..e85a2f0 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/CellScannerImpl.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/CellScannerImpl.java
@@ -18,7 +18,6 @@ package org.apache.fluo.core.impl.scanner;
 import java.util.Iterator;
 import java.util.Map.Entry;
 
-import com.google.common.base.Function;
 import com.google.common.collect.Iterators;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
@@ -32,19 +31,15 @@ public class CellScannerImpl implements CellScanner {
 
   private Iterable<Entry<Key, Value>> snapshot;
 
-  private static final Function<Entry<Key, Value>, RowColumnValue> E2RCV =
-      new Function<Entry<Key, Value>, RowColumnValue>() {
-        @Override
-        public RowColumnValue apply(Entry<Key, Value> entry) {
-          Bytes row = ByteUtil.toBytes(entry.getKey().getRowData());
-          Bytes cf = ByteUtil.toBytes(entry.getKey().getColumnFamilyData());
-          Bytes cq = ByteUtil.toBytes(entry.getKey().getColumnQualifierData());
-          Bytes cv = ByteUtil.toBytes(entry.getKey().getColumnVisibilityData());
-          Column col = new Column(cf, cq, cv);
-          Bytes val = Bytes.of(entry.getValue().get());
-          return new RowColumnValue(row, col, val);
-        }
-      };
+  private static RowColumnValue entry2rcv(Entry<Key, Value> entry) {
+    Bytes row = ByteUtil.toBytes(entry.getKey().getRowData());
+    Bytes cf = ByteUtil.toBytes(entry.getKey().getColumnFamilyData());
+    Bytes cq = ByteUtil.toBytes(entry.getKey().getColumnQualifierData());
+    Bytes cv = ByteUtil.toBytes(entry.getKey().getColumnVisibilityData());
+    Column col = new Column(cf, cq, cv);
+    Bytes val = Bytes.of(entry.getValue().get());
+    return new RowColumnValue(row, col, val);
+  }
 
   CellScannerImpl(Iterable<Entry<Key, Value>> snapshot) {
     this.snapshot = snapshot;
@@ -52,6 +47,6 @@ public class CellScannerImpl implements CellScanner {
 
   @Override
   public Iterator<RowColumnValue> iterator() {
-    return Iterators.transform(snapshot.iterator(), E2RCV);
+    return Iterators.transform(snapshot.iterator(), CellScannerImpl::entry2rcv);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ColumnScannerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ColumnScannerImpl.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ColumnScannerImpl.java
index 7cde4a5..21ee94c 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ColumnScannerImpl.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ColumnScannerImpl.java
@@ -18,7 +18,6 @@ package org.apache.fluo.core.impl.scanner;
 import java.util.Iterator;
 import java.util.Map.Entry;
 
-import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterators;
 import com.google.common.collect.PeekingIterator;
@@ -32,18 +31,14 @@ import org.apache.fluo.core.util.ByteUtil;
 
 public class ColumnScannerImpl implements ColumnScanner {
 
-  public static final Function<Entry<Key, Value>, ColumnValue> E2CV =
-      new Function<Entry<Key, Value>, ColumnValue>() {
-        @Override
-        public ColumnValue apply(Entry<Key, Value> entry) {
-          Bytes cf = ByteUtil.toBytes(entry.getKey().getColumnFamilyData());
-          Bytes cq = ByteUtil.toBytes(entry.getKey().getColumnQualifierData());
-          Bytes cv = ByteUtil.toBytes(entry.getKey().getColumnVisibilityData());
-          Column col = new Column(cf, cq, cv);
-          Bytes val = Bytes.of(entry.getValue().get());
-          return new ColumnValue(col, val);
-        }
-      };
+  public static ColumnValue entry2cv(Entry<Key, Value> entry) {
+    Bytes cf = ByteUtil.toBytes(entry.getKey().getColumnFamilyData());
+    Bytes cq = ByteUtil.toBytes(entry.getKey().getColumnQualifierData());
+    Bytes cv = ByteUtil.toBytes(entry.getKey().getColumnVisibilityData());
+    Column col = new Column(cf, cq, cv);
+    Bytes val = Bytes.of(entry.getValue().get());
+    return new ColumnValue(col, val);
+  }
 
   private PeekingIterator<Entry<Key, Value>> peekingIter;
   private Bytes row;
@@ -53,7 +48,7 @@ public class ColumnScannerImpl implements ColumnScanner {
   ColumnScannerImpl(Iterator<Entry<Key, Value>> e) {
     peekingIter = Iterators.peekingIterator(e);
     row = ByteUtil.toBytes(peekingIter.peek().getKey().getRowData());
-    iter = Iterators.transform(peekingIter, E2CV);
+    iter = Iterators.transform(peekingIter, ColumnScannerImpl::entry2cv);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/RowScannerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/RowScannerImpl.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/RowScannerImpl.java
index 4a9eb38..631ac5d 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/RowScannerImpl.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/RowScannerImpl.java
@@ -18,7 +18,6 @@ package org.apache.fluo.core.impl.scanner;
 import java.util.Iterator;
 import java.util.Map.Entry;
 
-import com.google.common.base.Function;
 import com.google.common.collect.Iterators;
 import org.apache.accumulo.core.client.RowIterator;
 import org.apache.accumulo.core.data.Key;
@@ -30,14 +29,6 @@ public class RowScannerImpl implements RowScanner {
 
   private Iterable<Entry<Key, Value>> snapshot;
 
-  private static final Function<Iterator<Entry<Key, Value>>, ColumnScanner>
RI2CS =
-      new Function<Iterator<Entry<Key, Value>>, ColumnScanner>() {
-        @Override
-        public ColumnScanner apply(Iterator<Entry<Key, Value>> input) {
-          return new ColumnScannerImpl(input);
-        }
-      };
-
   RowScannerImpl(Iterable<Entry<Key, Value>> snapshot) {
     this.snapshot = snapshot;
   }
@@ -45,6 +36,6 @@ public class RowScannerImpl implements RowScanner {
   @Override
   public Iterator<ColumnScanner> iterator() {
     RowIterator rowiter = new RowIterator(snapshot.iterator());
-    return Iterators.transform(rowiter, RI2CS);
+    return Iterators.transform(rowiter, e -> new ColumnScannerImpl(e));
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java b/modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java
index fe5c21d..a1020b9 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java
@@ -17,10 +17,8 @@ package org.apache.fluo.core.log;
 
 import java.util.Collection;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Set;
 
-import com.google.common.base.Function;
 import com.google.common.collect.Iterators;
 import org.apache.fluo.api.client.Snapshot;
 import org.apache.fluo.api.client.scanner.ScannerBuilder;
@@ -70,53 +68,25 @@ public class TracingTransaction implements AsyncTransaction, Snapshot
{
   }
 
   private String encB(Collection<Bytes> columns) {
-    return Iterators.toString(Iterators.transform(columns.iterator(),
-        new Function<Bytes, String>() {
-          @Override
-          public String apply(Bytes b) {
-            return Hex.encNonAscii(b);
-          }
-        }));
+    return Iterators.toString(Iterators.transform(columns.iterator(), Hex::encNonAscii));
   }
 
   private String encRC(Collection<RowColumn> ret) {
-    return Iterators.toString(Iterators.transform(ret.iterator(),
-        new Function<RowColumn, String>() {
-          @Override
-          public String apply(RowColumn rc) {
-            return Hex.encNonAscii(rc);
-          }
-        }));
+    return Iterators.toString(Iterators.transform(ret.iterator(), Hex::encNonAscii));
   }
 
   private String encRC(Map<Bytes, Map<Column, Bytes>> ret) {
-    return Iterators.toString(Iterators.transform(ret.entrySet().iterator(),
-        new Function<Entry<Bytes, Map<Column, Bytes>>, String>() {
-          @Override
-          public String apply(Entry<Bytes, Map<Column, Bytes>> e) {
-            return enc(e.getKey()) + "=" + encC(e.getValue());
-          }
-        }));
+    return Iterators.toString(Iterators.transform(ret.entrySet().iterator(), e -> enc(e.getKey())
+        + "=" + encC(e.getValue())));
   }
 
   private String encC(Collection<Column> columns) {
-    return Iterators.toString(Iterators.transform(columns.iterator(),
-        new Function<Column, String>() {
-          @Override
-          public String apply(Column col) {
-            return Hex.encNonAscii(col);
-          }
-        }));
+    return Iterators.toString(Iterators.transform(columns.iterator(), Hex::encNonAscii));
   }
 
   private String encC(Map<Column, Bytes> ret) {
-    return Iterators.toString(Iterators.transform(ret.entrySet().iterator(),
-        new Function<Entry<Column, Bytes>, String>() {
-          @Override
-          public String apply(Entry<Column, Bytes> e) {
-            return enc(e.getKey()) + "=" + enc(e.getValue());
-          }
-        }));
+    return Iterators.toString(Iterators.transform(ret.entrySet().iterator(), e -> enc(e.getKey())
+        + "=" + enc(e.getValue())));
   }
 
   public TracingTransaction(AsyncTransaction tx, Notification notification, Class<?>
clazz) {

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/worker/TabletInfoCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/worker/TabletInfoCache.java b/modules/core/src/main/java/org/apache/fluo/core/worker/TabletInfoCache.java
index 11204cc..4d17965 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/worker/TabletInfoCache.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/worker/TabletInfoCache.java
@@ -20,8 +20,8 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Supplier;
 
-import com.google.common.base.Supplier;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.TableNotFoundException;

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/ScanTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/ScanTask.java
b/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/ScanTask.java
index f2d5396..eb4adf0 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/ScanTask.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/ScanTask.java
@@ -21,8 +21,8 @@ import java.util.List;
 import java.util.Map.Entry;
 import java.util.Random;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Supplier;
 
-import com.google.common.base.Supplier;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index 0727749..bf95251 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/integration/pom.xml
----------------------------------------------------------------------
diff --git a/modules/integration/pom.xml b/modules/integration/pom.xml
index 61cffa9..a723838 100644
--- a/modules/integration/pom.xml
+++ b/modules/integration/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
----------------------------------------------------------------------
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
index ac713bc..bf5d746 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
@@ -174,9 +174,8 @@ public class GarbageCollectionIteratorIT extends ITBaseImpl {
 
   private int countInTable(String str) throws TableNotFoundException {
     int count = 0;
-    FluoFormatter ff = new FluoFormatter();
     Scanner scanner = conn.createScanner(table, Authorizations.EMPTY);
-    for (String e : Iterables.transform(scanner, ff)) {
+    for (String e : Iterables.transform(scanner, FluoFormatter::toString)) {
       if (e.contains(str)) {
         count++;
       }

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
----------------------------------------------------------------------
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
index bdf473d..386ab6f 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
@@ -19,15 +19,12 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
 import com.google.common.collect.Iterables;
 import org.apache.fluo.api.client.Snapshot;
 import org.apache.fluo.api.client.Transaction;
 import org.apache.fluo.api.client.scanner.CellScanner;
 import org.apache.fluo.api.client.scanner.ColumnScanner;
 import org.apache.fluo.api.client.scanner.RowScanner;
-import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.data.ColumnValue;
 import org.apache.fluo.api.data.RowColumnValue;
@@ -38,73 +35,36 @@ import org.junit.Test;
 
 public class ScannerIT extends ITBaseImpl {
 
-  static class ColumnPredicate implements Predicate<RowColumnValue> {
-    Column c;
-
-    ColumnPredicate(Column c) {
-      this.c = c;
-    }
-
-    @Override
-    public boolean apply(RowColumnValue input) {
-      return input.getColumn().equals(c);
-    }
-  }
-
-  static class FamilyPredicate implements Predicate<RowColumnValue> {
-    Bytes fam;
-
-    FamilyPredicate(String family) {
-      this.fam = Bytes.of(family);
-    }
-
-    @Override
-    public boolean apply(RowColumnValue input) {
-      return input.getColumn().getFamily().equals(fam);
-    }
-  }
-
-  static class RowPredicate implements Predicate<RowColumnValue> {
-    Bytes row;
-
-    RowPredicate(String row) {
-      this.row = Bytes.of(row);
-    }
-
-    @Override
-    public boolean apply(RowColumnValue input) {
-      return input.getRow().equals(row);
-    }
-  }
-
   @Test
   public void testFiltering() {
     Set<RowColumnValue> expected = genData();
 
     HashSet<RowColumnValue> expectedR2 = new HashSet<>();
-    Iterables.addAll(expectedR2, Iterables.filter(expected, new RowPredicate("r2")));
+    Iterables.addAll(expectedR2, Iterables.filter(expected, rcv -> rcv.getsRow().equals("r2")));
     Assert.assertEquals(2, expectedR2.size());
 
-
     HashSet<RowColumnValue> expectedR2c = new HashSet<>();
     Iterables.addAll(
         expectedR2c,
         Iterables.filter(expected,
-            Predicates.and(new RowPredicate("r2"), new ColumnPredicate(new Column("f1", "q2")))));
+            rcv -> rcv.getsRow().equals("r2") && rcv.getColumn().equals(new Column("f1",
"q2"))));
     Assert.assertEquals(1, expectedR2c.size());
 
     HashSet<RowColumnValue> expectedC = new HashSet<>();
     Iterables.addAll(expectedC,
-        Iterables.filter(expected, new ColumnPredicate(new Column("f1", "q1"))));
+        Iterables.filter(expected, rcv -> rcv.getColumn().equals(new Column("f1", "q1"))));
     Assert.assertEquals(2, expectedC.size());
 
     HashSet<RowColumnValue> expectedCF = new HashSet<>();
-    Iterables.addAll(expectedCF, Iterables.filter(expected, new FamilyPredicate("f2")));
+    Iterables.addAll(expectedCF,
+        Iterables.filter(expected, rcv -> rcv.getColumn().getsFamily().equals("f2")));
     Assert.assertEquals(2, expectedCF.size());
 
     HashSet<RowColumnValue> expectedCols = new HashSet<>();
-    Iterables.addAll(expectedCols, Iterables.filter(expected, Predicates.or(new ColumnPredicate(
-        new Column("f2", "q5")), new ColumnPredicate(new Column("f1", "q1")))));
+    Iterables.addAll(
+        expectedCols,
+        Iterables.filter(expected, rcv -> rcv.getColumn().equals(new Column("f2", "q5"))
+            || rcv.getColumn().equals(new Column("f1", "q1"))));
     Assert.assertEquals(3, expectedCols.size());
 
     try (Snapshot snap = client.newSnapshot()) {

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
----------------------------------------------------------------------
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
index caa7357..546a69d 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
@@ -249,7 +249,7 @@ public class StochasticBankIT extends ITBaseImpl {
 
     Scanner scanner = env.getConnector().createScanner(env.getTable(), env.getAuthorizations());
 
-    for (String cell : Iterables.transform(scanner, new FluoFormatter())) {
+    for (String cell : Iterables.transform(scanner, FluoFormatter::toString)) {
       fw.append(cell);
       fw.append("\n");
     }

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/mapreduce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mapreduce/pom.xml b/modules/mapreduce/pom.xml
index 0eed66b..56b3fdd 100644
--- a/modules/mapreduce/pom.xml
+++ b/modules/mapreduce/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/modules/mini/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mini/pom.xml b/modules/mini/pom.xml
index b554f35..e585e8d 100644
--- a/modules/mini/pom.xml
+++ b/modules/mini/pom.xml
@@ -17,7 +17,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.fluo</groupId>
-    <artifactId>fluo-parent</artifactId>
+    <artifactId>fluo</artifactId>
     <version>1.0.0-incubating-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/d4dddf52/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9c80bbd..14fe583 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,12 +16,12 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>io.fluo</groupId>
-    <artifactId>fluo-io-parent</artifactId>
-    <version>2</version>
+    <groupId>org.apache.fluo</groupId>
+    <artifactId>fluo-parent</artifactId>
+    <version>1-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.fluo</groupId>
-  <artifactId>fluo-parent</artifactId>
+  <artifactId>fluo</artifactId>
   <version>1.0.0-incubating-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>Fluo Parent</name>
@@ -355,30 +355,4 @@
       </plugin>
     </plugins>
   </build>
-  <profiles>
-    <profile>
-      <id>fluo-io-release</id>
-      <build>
-        <pluginManagement>
-          <plugins>
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-assembly-plugin</artifactId>
-              <configuration>
-                <finalName>fluo-${project.version}</finalName>
-                <attach>false</attach>
-              </configuration>
-            </plugin>
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-release-plugin</artifactId>
-              <configuration>
-                <tagNameFormat>fluo-@{project.version}</tagNameFormat>
-              </configuration>
-            </plugin>
-          </plugins>
-        </pluginManagement>
-      </build>
-    </profile>
-  </profiles>
 </project>


Mime
View raw message