You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pirk.apache.org by ea...@apache.org on 2016/07/23 15:29:13 UTC

[1/4] incubator-pirk git commit: PIRK-11 Switch to SLF4J with Log4j2 bindings, including other minor cleanup - closes apache/incubator-pirk#20

Repository: incubator-pirk
Updated Branches:
  refs/heads/master ec5104440 -> ef8d1c1a5


http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/SystemConfiguration.java b/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
index 5f100ad..b4db2a6 100755
--- a/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
+++ b/src/main/java/org/apache/pirk/utils/SystemConfiguration.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.io.File;
@@ -24,9 +24,10 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Manages system properties. At first loading of this class, it will:
@@ -38,19 +39,19 @@ import org.apache.pirk.schema.query.LoadQuerySchemas;
  */
 public class SystemConfiguration
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(SystemConfiguration.class);
 
   private static final Properties props;
 
   /**
    * By default, if the pirk.properties file is found on the root of the classpath, it is loaded first.
    */
-  public static final String DEFAULT_PROPERTY_FILE = "pirk.properties";
+  private static final String DEFAULT_PROPERTY_FILE = "pirk.properties";
 
   /**
    * By default, if the local.pirk.properties file is found on the root of the classpath, it is loaded after pirk.properites.
    */
-  public static final String LOCAL_PROPERTY_FILE = "local.pirk.properties";
+  private static final String LOCAL_PROPERTY_FILE = "local.pirk.properties";
 
   static
   {
@@ -104,19 +105,11 @@ public class SystemConfiguration
     File localFile = new File(getProperty(LOCAL_PROPERTY_FILE));
     if (localFile.exists())
     {
-      try
+      try(InputStream stream = new FileInputStream(localFile);)
       {
-        InputStream stream = new FileInputStream(localFile);
-        if (stream != null)
-        {
-          logger.info("Loading local properties file '" + localFile.getAbsolutePath() + "'");
-          props.load(stream);
-          stream.close();
-        }
-        else
-        {
-          logger.info("No local configuration file found '" + localFile.getAbsolutePath() + "'");
-        }
+        logger.info("Loading local properties file '" + localFile.getAbsolutePath() + "'");
+        props.load(stream);
+        stream.close();
       } catch (IOException e)
       {
         logger.error("Problem loading local properties file '" + localFile.getAbsolutePath() + "'");

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/ISO8601DateParserTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/ISO8601DateParserTest.java b/src/test/java/test/general/ISO8601DateParserTest.java
index ac52027..b3d41aa 100644
--- a/src/test/java/test/general/ISO8601DateParserTest.java
+++ b/src/test/java/test/general/ISO8601DateParserTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,24 +15,23 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-
 import java.text.ParseException;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.utils.ISO8601DateParser;
-import org.apache.pirk.utils.LogUtils;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Class to test basic functionality of ISO8601DateParser class
  */
 public class ISO8601DateParserTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ISO8601DateParserTest.class);
 
   @Test
   public void testDateParsing() throws ParseException

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/KeyedHashTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/KeyedHashTest.java b/src/test/java/test/general/KeyedHashTest.java
index 7df71ec..131e18f 100644
--- a/src/test/java/test/general/KeyedHashTest.java
+++ b/src/test/java/test/general/KeyedHashTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,15 +15,14 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-
-import org.apache.log4j.Logger;
 import org.apache.pirk.utils.KeyedHash;
-import org.apache.pirk.utils.LogUtils;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Basic functional tests for KeyedHash
@@ -31,7 +30,7 @@ import org.junit.Test;
  */
 public class KeyedHashTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(KeyedHashTest.class);
 
   @Test
   public void testKeyedHash()

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/PaillierTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/PaillierTest.java b/src/test/java/test/general/PaillierTest.java
index 7ca4623..ce86285 100644
--- a/src/test/java/test/general/PaillierTest.java
+++ b/src/test/java/test/general/PaillierTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,22 +15,20 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 import java.math.BigInteger;
 import java.util.Random;
 
-import org.apache.log4j.Logger;
-import org.junit.Test;
-
-import org.apache.pirk.utils.LogUtils;
+import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.utils.PIRException;
 import org.apache.pirk.utils.SystemConfiguration;
-import org.apache.pirk.encryption.Paillier;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 /**
  * Basic test functionality for Paillier library
@@ -38,22 +36,22 @@ import org.apache.pirk.encryption.Paillier;
  */
 public class PaillierTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(PaillierTest.class);
 
-  BigInteger p = null; // large prime
-  BigInteger q = null; // large prime
-  BigInteger N = null; // N=pq, RSA modulus
-  BigInteger NSquared = null; // N^2
-  BigInteger lambdaN = null; // lambda(N) = lcm(p-1,q-1)
+  private BigInteger p = null; // large prime
+  private BigInteger q = null; // large prime
+  private BigInteger N = null; // N=pq, RSA modulus
+  private BigInteger NSquared = null; // N^2
+  private BigInteger lambdaN = null; // lambda(N) = lcm(p-1,q-1)
 
-  int bitLength = 0; // bit length of the modulus N
-  int certainty = 64; // prob that new BigInteger values represents primes will exceed (1 - (1/2)^certainty)
+  private int bitLength = 0; // bit length of the modulus N
+  private int certainty = 64; // prob that new BigInteger values represents primes will exceed (1 - (1/2)^certainty)
 
-  BigInteger r1 = null; // random number in (Z/NZ)*
-  BigInteger r2 = null; // random number in (Z/NZ)*
+  private BigInteger r1 = null; // random number in (Z/NZ)*
+  private BigInteger r2 = null; // random number in (Z/NZ)*
 
-  BigInteger m1 = null; // message to encrypt
-  BigInteger m2 = null; // message to encrypt
+  private BigInteger m1 = null; // message to encrypt
+  private BigInteger m2 = null; // message to encrypt
 
   public PaillierTest()
   {
@@ -85,42 +83,42 @@ public class PaillierTest
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(2), BigInteger.valueOf(2), 128);
       fail("Paillier constructor did not throw PIRException for p,q < 3");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(2), BigInteger.valueOf(3), 128);
       fail("Paillier constructor did not throw PIRException for p < 3");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(3), BigInteger.valueOf(2), 128);
       fail("Paillier constructor did not throw PIRException for q < 3");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(7), BigInteger.valueOf(7), 128);
       fail("Paillier constructor did not throw PIRException for p = q");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(8), BigInteger.valueOf(7), 128);
       fail("Paillier constructor did not throw PIRException for p not prime");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier paillier = new Paillier(BigInteger.valueOf(7), BigInteger.valueOf(10), 128);
       fail("Paillier constructor did not throw PIRException for q not prime");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
@@ -128,7 +126,7 @@ public class PaillierTest
       int systemPrimeCertainty = Integer.parseInt(SystemConfiguration.getProperty("pir.primeCertainty", "128"));
       Paillier paillier = new Paillier(3072, systemPrimeCertainty - 10);
       fail("Paillier constructor did not throw PIRException for certainty less than system default of " + systemPrimeCertainty);
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
@@ -136,7 +134,7 @@ public class PaillierTest
       Paillier pailler = new Paillier(p, q, bitLength);
       BigInteger encM1 = pailler.encrypt(N);
       fail("Paillier encryption did not throw PIRException for message m = N");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
@@ -144,21 +142,21 @@ public class PaillierTest
       Paillier pailler = new Paillier(p, q, bitLength);
       BigInteger encM1 = pailler.encrypt(N.add(BigInteger.TEN));
       fail("Paillier encryption did not throw PIRException for message m > N");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier pailler = new Paillier(bitLength, 128, bitLength);
       fail("Paillier constructor did not throw PIRException for ensureBitSet = bitLength");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
 
     try
     {
       Paillier pailler = new Paillier(bitLength, 128, bitLength + 1);
       fail("Paillier constructor did not throw PIRException for ensureBitSet > bitLength");
-    } catch (PIRException e)
+    } catch (PIRException ignore)
     {}
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/PartitionUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/PartitionUtilsTest.java b/src/test/java/test/general/PartitionUtilsTest.java
index 03ceef2..1ee866a 100644
--- a/src/test/java/test/general/PartitionUtilsTest.java
+++ b/src/test/java/test/general/PartitionUtilsTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,35 +15,32 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 import java.math.BigInteger;
 import java.util.ArrayList;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.apache.pirk.schema.data.partitioner.ISO8601DatePartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 /**
  * Class to functionally test the bit conversion utils
  */
 public class PartitionUtilsTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
-
-  PrimitiveTypePartitioner primitivePartitioner = null;
+  private static final Logger logger = LoggerFactory.getLogger(PartitionUtilsTest.class);
 
   public PartitionUtilsTest()
   {
-    primitivePartitioner = new PrimitiveTypePartitioner();
+    PrimitiveTypePartitioner primitivePartitioner = new PrimitiveTypePartitioner();
   }
 
   @Test
@@ -113,7 +110,7 @@ public class PartitionUtilsTest
 
       fail("BitConversionUtils.partitionBits did not throw error for mismatched partitionSize and mask size");
 
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     logger.info("Successfully completed testPartitionBits");
@@ -158,7 +155,7 @@ public class PartitionUtilsTest
     SystemConfiguration.setProperty("pir.stringBits", stringBits);
 
     // Test short
-    short shortTest = new Short("2456").shortValue();
+    short shortTest = new Short("2456");
     ArrayList<BigInteger> partsShort = primitivePartitioner.toPartitions(shortTest, PrimitiveTypePartitioner.SHORT);
     assertEquals(2, partsShort.size());
     assertEquals(shortTest, primitivePartitioner.fromPartitions(partsShort, 0, PrimitiveTypePartitioner.SHORT));

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/general/QueryParserUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/general/QueryParserUtilsTest.java b/src/test/java/test/general/QueryParserUtilsTest.java
index ab21f51..af2235c 100644
--- a/src/test/java/test/general/QueryParserUtilsTest.java
+++ b/src/test/java/test/general/QueryParserUtilsTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,38 +15,37 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.general;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 import java.util.ArrayList;
 import java.util.Map;
 
 import org.apache.hadoop.io.MapWritable;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.test.utils.Inputs;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.QueryParserUtils;
 import org.apache.pirk.utils.StringUtils;
 import org.json.simple.JSONObject;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Class for testing the QueryParser methods
  */
 public class QueryParserUtilsTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(QueryParserUtilsTest.class);
 
-  MapWritable doc = null; // MapWritable with arrays in json string representation
-  MapWritable docWAW = null; // MapWritable with arrays as WritableArrayWritable objects
-  Map<String,Object> docMap = null; // arrays as ArrayList<String>
+  private MapWritable doc = null; // MapWritable with arrays in json string representation
+  private MapWritable docWAW = null; // MapWritable with arrays as WritableArrayWritable objects
+  private Map<String,Object> docMap = null; // arrays as ArrayList<String>
 
-  DataSchema dSchema = null;
+  private DataSchema dSchema = null;
 
   public QueryParserUtilsTest() throws Exception
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/schema/data/LoadDataSchemaTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/schema/data/LoadDataSchemaTest.java b/src/test/java/test/schema/data/LoadDataSchemaTest.java
index f729418..361442a 100644
--- a/src/test/java/test/schema/data/LoadDataSchemaTest.java
+++ b/src/test/java/test/schema/data/LoadDataSchemaTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,13 +15,9 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.schema.data;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import java.io.File;
 import java.io.IOException;
 
@@ -32,30 +28,33 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
 import org.apache.pirk.test.utils.TestUtils;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /**
  * Test suite for LoadDataSchema and DataSchema
  */
 public class LoadDataSchemaTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static Logger logger = LoggerFactory.getLogger(LoadDataSchemaTest.class);
 
-  String dataSchemaName = "fakeDataSchema";
+  private String dataSchemaName = "fakeDataSchema";
 
-  String element1 = "elementName1";
-  String element2 = "elementName2";
-  String element3 = "elementName3";
+  private String element1 = "elementName1";
+  private String element2 = "elementName2";
+  private String element3 = "elementName3";
 
   @Test
   public void testGeneralSchemaLoad() throws Exception
@@ -137,7 +136,7 @@ public class LoadDataSchemaTest
       // Force the schema to load
       LoadDataSchemas.initialize();
       fail("LoadDataSchemas did not throw exception for incorrect javaType");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original data.schemas property
@@ -168,7 +167,7 @@ public class LoadDataSchemaTest
       // Force the schema to load
       LoadDataSchemas.initialize();
       fail("LoadDataSchemas did not throw exception for unknown partitioner");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original data.schemas property

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/schema/query/LoadQuerySchemaTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/schema/query/LoadQuerySchemaTest.java b/src/test/java/test/schema/query/LoadQuerySchemaTest.java
index a21a25a..c1a5d9e 100644
--- a/src/test/java/test/schema/query/LoadQuerySchemaTest.java
+++ b/src/test/java/test/schema/query/LoadQuerySchemaTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,15 +15,13 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.schema.query;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -33,7 +31,6 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
@@ -42,30 +39,34 @@ import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.schema.query.filter.StopListFilter;
 import org.apache.pirk.test.utils.Inputs;
 import org.apache.pirk.test.utils.TestUtils;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import test.schema.data.LoadDataSchemaTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 /**
  * Test suite for LoadQuerySchema and QuerySchema
  */
 public class LoadQuerySchemaTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(LoadDataSchemaTest.class);
 
-  String querySchemaFile = "querySchemaFile";
-  String dataSchemaName = "fakeDataSchema";
-  String querySchemaName = "fakeQuerySchema";
+  private String querySchemaFile = "querySchemaFile";
+  private String dataSchemaName = "fakeDataSchema";
+  private String querySchemaName = "fakeQuerySchema";
 
-  String element1 = "elementName1";
-  String element2 = "elementName2";
-  String element3 = "elementName3";
-  String element4 = "elementName4";
+  private String element1 = "elementName1";
+  private String element2 = "elementName2";
+  private String element3 = "elementName3";
+  private String element4 = "elementName4";
 
-  List<String> queryElements = Arrays.asList(element1, element2, element3);
-  List<String> filterElements = Arrays.asList(element2);
+  private List<String> queryElements = Arrays.asList(element1, element2, element3);
+  private List<String> filterElements = Collections.singletonList(element2);
 
   @Test
   public void testGeneralSchemaLoad() throws Exception
@@ -191,7 +192,7 @@ public class LoadQuerySchemaTest
     {
       LoadQuerySchemas.initialize();
       fail("LoadQuerySchemas did not throw exception for bogus filter class");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original query and data schema properties
@@ -234,7 +235,7 @@ public class LoadQuerySchemaTest
     {
       LoadQuerySchemas.initialize();
       fail("LoadQuerySchemas did not throw exception for non-existent DataSchema");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original query properties and force to load
@@ -282,7 +283,7 @@ public class LoadQuerySchemaTest
     {
       LoadQuerySchemas.initialize();
       fail("LoadQuerySchemas did not throw exception for non-existent selectorName");
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     // Reset original query and data schema properties

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/test/java/test/wideskies/standalone/StandaloneTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/test/wideskies/standalone/StandaloneTest.java b/src/test/java/test/wideskies/standalone/StandaloneTest.java
index b238f7c..cfcaa7a 100644
--- a/src/test/java/test/wideskies/standalone/StandaloneTest.java
+++ b/src/test/java/test/wideskies/standalone/StandaloneTest.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,19 +15,19 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package test.wideskies.standalone;
 
 import java.util.ArrayList;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.query.filter.StopListFilter;
 import org.apache.pirk.test.utils.BaseTests;
 import org.apache.pirk.test.utils.Inputs;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONObject;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Functional test suite for stand alone testing - non Spark applications
@@ -41,11 +41,11 @@ import org.junit.Test;
  */
 public class StandaloneTest
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(StandaloneTest.class);
 
   private static final String STOPLIST_FILE = "testStopListFile";
 
-  String stopListFileProp = null;
+  private String stopListFileProp = null;
 
   public StandaloneTest() throws Exception
   {


[3/4] incubator-pirk git commit: PIRK-11 Switch to SLF4J with Log4j2 bindings, including other minor cleanup - closes apache/incubator-pirk#20

Posted by ea...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/common/HashSelectorAndPartitionData.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/common/HashSelectorAndPartitionData.java b/src/main/java/org/apache/pirk/responder/wideskies/common/HashSelectorAndPartitionData.java
index 2f1e069..7eb264a 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/common/HashSelectorAndPartitionData.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/common/HashSelectorAndPartitionData.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,23 +15,22 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.common;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
 
 import org.apache.hadoop.io.MapWritable;
-import org.apache.log4j.Logger;
 import org.apache.pirk.inputformat.hadoop.BytesArrayWritable;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.query.wideskies.QueryUtils;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.utils.KeyedHash;
-import org.apache.pirk.utils.LogUtils;
 import org.json.simple.JSONObject;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -40,12 +39,12 @@ import scala.Tuple2;
  */
 public class HashSelectorAndPartitionData
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(HashSelectorAndPartitionData.class);
 
   public static Tuple2<Integer,ArrayList<BigInteger>> hashSelectorAndFormPartitionsBigInteger(MapWritable dataElement, QuerySchema qSchema, DataSchema dSchema,
       QueryInfo queryInfo) throws Exception
   {
-    Tuple2<Integer,ArrayList<BigInteger>> returnTuple = null;
+    Tuple2<Integer,ArrayList<BigInteger>> returnTuple;
 
     // Pull the selector based on the query type
     String selector = QueryUtils.getSelectorByQueryType(dataElement, qSchema, dSchema);
@@ -56,7 +55,7 @@ public class HashSelectorAndPartitionData
     // Partition by the given partitionSize
     ArrayList<BigInteger> hitValPartitions = QueryUtils.partitionDataElement(dataElement, qSchema, dSchema, queryInfo.getEmbedSelector());
 
-    returnTuple = new Tuple2<Integer,ArrayList<BigInteger>>(hash, hitValPartitions);
+    returnTuple = new Tuple2<>(hash, hitValPartitions);
 
     return returnTuple;
   }
@@ -64,7 +63,7 @@ public class HashSelectorAndPartitionData
   public static Tuple2<Integer,BytesArrayWritable> hashSelectorAndFormPartitions(MapWritable dataElement, QuerySchema qSchema, DataSchema dSchema,
       QueryInfo queryInfo) throws Exception
   {
-    Tuple2<Integer,BytesArrayWritable> returnTuple = null;
+    Tuple2<Integer,BytesArrayWritable> returnTuple;
 
     // Pull the selector based on the query type
     String selector = QueryUtils.getSelectorByQueryType(dataElement, qSchema, dSchema);
@@ -76,14 +75,14 @@ public class HashSelectorAndPartitionData
     ArrayList<BigInteger> hitValPartitions = QueryUtils.partitionDataElement(dataElement, qSchema, dSchema, queryInfo.getEmbedSelector());
     BytesArrayWritable bAW = new BytesArrayWritable(hitValPartitions);
 
-    returnTuple = new Tuple2<Integer,BytesArrayWritable>(hash, bAW);
+    returnTuple = new Tuple2<>(hash, bAW);
 
     return returnTuple;
   }
 
   public static Tuple2<Integer,ArrayList<BigInteger>> hashSelectorAndFormPartitions(JSONObject json, QueryInfo queryInfo) throws Exception
   {
-    Tuple2<Integer,ArrayList<BigInteger>> returnTuple = null;
+    Tuple2<Integer,ArrayList<BigInteger>> returnTuple;
 
     // Pull the selector based on the query type
     String selector = QueryUtils.getSelectorByQueryTypeJSON(queryInfo.getQueryType(), json);
@@ -94,7 +93,7 @@ public class HashSelectorAndPartitionData
     // Partition by the given partitionSize
     ArrayList<BigInteger> hitValPartitions = QueryUtils.partitionDataElement(queryInfo.getQueryType(), json, queryInfo.getEmbedSelector());
 
-    returnTuple = new Tuple2<Integer,ArrayList<BigInteger>>(hash, hitValPartitions);
+    returnTuple = new Tuple2<>(hash, hitValPartitions);
 
     return returnTuple;
   }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultMapper.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultMapper.java
index 5aa3ffe..92993ff 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultMapper.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultMapper.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.IOException;
@@ -23,9 +23,9 @@ import java.io.IOException;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Mapper;
-import org.apache.log4j.Logger;
 import org.apache.pirk.utils.CSVOutputUtils;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Pass through mapper for encrypted column multiplication
@@ -33,10 +33,10 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class ColumnMultMapper extends Mapper<LongWritable,Text,LongWritable,Text>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ColumnMultMapper.class);
 
-  LongWritable keyOut = null;
-  Text valueOut = null;
+  private LongWritable keyOut = null;
+  private Text valueOut = null;
 
   @Override
   public void setup(Context ctx) throws IOException, InterruptedException

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultReducer.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultReducer.java
index cfca83c..abffadf 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultReducer.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ColumnMultReducer.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.IOException;
@@ -27,10 +27,10 @@ import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Reducer;
 import org.apache.hadoop.mapreduce.lib.output.MultipleOutputs;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.utils.FileConst;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Reducer to perform encrypted column multiplication
@@ -38,12 +38,12 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class ColumnMultReducer extends Reducer<LongWritable,Text,LongWritable,Text>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ColumnMultReducer.class);
 
-  Text outputValue = null;
+  private Text outputValue = null;
   private MultipleOutputs<LongWritable,Text> mos = null;
 
-  Query query = null;
+  private Query query = null;
 
   @Override
   public void setup(Context ctx) throws IOException, InterruptedException
@@ -51,7 +51,7 @@ public class ColumnMultReducer extends Reducer<LongWritable,Text,LongWritable,Te
     super.setup(ctx);
 
     outputValue = new Text();
-    mos = new MultipleOutputs<LongWritable,Text>(ctx);
+    mos = new MultipleOutputs<>(ctx);
 
     FileSystem fs = FileSystem.newInstance(ctx.getConfiguration());
     String queryDir = ctx.getConfiguration().get("pirMR.queryInputDir");

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ComputeResponseTool.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ComputeResponseTool.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ComputeResponseTool.java
index 827f0b1..fb3027b 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ComputeResponseTool.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ComputeResponseTool.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.BufferedReader;
@@ -41,7 +41,6 @@ import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
 import org.apache.hadoop.mapreduce.lib.output.MultipleOutputs;
 import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
 import org.apache.hadoop.util.Tool;
-import org.apache.log4j.Logger;
 import org.apache.pirk.inputformat.hadoop.BaseInputFormat;
 import org.apache.pirk.inputformat.hadoop.BytesArrayWritable;
 import org.apache.pirk.inputformat.hadoop.InputFormatConst;
@@ -52,9 +51,10 @@ import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.utils.FileConst;
 import org.apache.pirk.utils.HDFS;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.elasticsearch.hadoop.mr.EsInputFormat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Tool for computing the PIR response in MapReduce
@@ -62,14 +62,14 @@ import org.elasticsearch.hadoop.mr.EsInputFormat;
  * Each query run consists of three MR jobs:
  * <p>
  * (1) Map: Initialization mapper reads data using an extension of the BaseInputFormat or elasticsearch and, according to the QueryInfo object, extracts the
- * selector from each dataElement according to the QueryType, hashes selector, and outputs {@code<hash(selector), dataElement>}
+ * selector from each dataElement according to the QueryType, hashes selector, and outputs {@link <hash(selector), dataElement>}
  * <p>
  * Reduce: Calculates the encrypted row values for each selector and corresponding data element, striping across columns,and outputs each row entry by column
- * position: {@code<colNum, colVal>}
+ * position: {@link <colNum, colVal>}
  * <p>
  * (2) Map: Pass through mapper to aggregate by column number
  * <p>
- * Reduce: Input: {@code<colnum, <colVals>>}; multiplies all colVals according to the encryption algorithm and outputs {@code<colNum, colVal>} for each colNum
+ * Reduce: Input: {@link <colnum, <colVals>>}; multiplies all colVals according to the encryption algorithm and outputs {@link <colNum, colVal>} for each colNum
  * <p>
  * (3) Map: Pass through mapper to move all final columns to one reducer
  * <p>
@@ -89,32 +89,32 @@ import org.elasticsearch.hadoop.mr.EsInputFormat;
  */
 public class ComputeResponseTool extends Configured implements Tool
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ComputeResponseTool.class);
 
-  String dataInputFormat = null;
-  String inputFile = null;
-  String outputFile = null;
-  String outputDirExp = null;
-  String outputDirInit = null;
-  String outputDirColumnMult = null;
-  String outputDirFinal = null;
-  String queryInputDir = null;
-  String stopListFile = null;
-  int numReduceTasks = 1;
+  private String dataInputFormat = null;
+  private String inputFile = null;
+  private String outputFile = null;
+  private String outputDirExp = null;
+  private String outputDirInit = null;
+  private String outputDirColumnMult = null;
+  private String outputDirFinal = null;
+  private String queryInputDir = null;
+  private String stopListFile = null;
+  private int numReduceTasks = 1;
 
-  boolean useHDFSLookupTable = false;
+  private boolean useHDFSLookupTable = false;
 
-  String esQuery = "none";
-  String esResource = "none";
+  private String esQuery = "none";
+  private String esResource = "none";
 
   String dataSchema = "none";
 
-  Configuration conf = null;
-  FileSystem fs = null;
+  private Configuration conf = null;
+  private FileSystem fs = null;
 
-  Query query = null;
-  QueryInfo queryInfo = null;
-  QuerySchema qSchema = null;
+  private Query query = null;
+  private QueryInfo queryInfo = null;
+  private QuerySchema qSchema = null;
 
   public ComputeResponseTool() throws Exception
   {
@@ -223,7 +223,7 @@ public class ComputeResponseTool extends Configured implements Tool
 
   private boolean computeExpTable() throws IOException, ClassNotFoundException, InterruptedException
   {
-    boolean success = false;
+    boolean success;
 
     logger.info("Creating expTable");
 
@@ -235,7 +235,7 @@ public class ComputeResponseTool extends Configured implements Tool
     }
     // Write the query hashes to the split files
     TreeMap<Integer,BigInteger> queryElements = query.getQueryElements();
-    ArrayList<Integer> keys = new ArrayList<Integer>(queryElements.keySet());
+    ArrayList<Integer> keys = new ArrayList<>(queryElements.keySet());
 
     int numSplits = Integer.parseInt(SystemConfiguration.getProperty("pir.expCreationSplits", "100"));
     int elementsPerSplit = (int) Math.floor(queryElements.size() / numSplits);
@@ -302,13 +302,13 @@ public class ComputeResponseTool extends Configured implements Tool
 
     // Assemble the exp table from the output
     // element_index -> fileName
-    HashMap<Integer,String> expFileTable = new HashMap<Integer,String>();
+    HashMap<Integer,String> expFileTable = new HashMap<>();
     FileStatus[] status = fs.listStatus(outPathExp);
     for (FileStatus fstat : status)
     {
-      if (fstat.getPath().getName().toString().startsWith(FileConst.PIR))
+      if (fstat.getPath().getName().startsWith(FileConst.PIR))
       {
-        logger.info("fstat.getPath().getName().toString() = " + fstat.getPath().getName().toString());
+        logger.info("fstat.getPath().getName().toString() = " + fstat.getPath().getName());
         try
         {
           InputStreamReader isr = new InputStreamReader(fs.open(fstat.getPath()));
@@ -340,7 +340,7 @@ public class ComputeResponseTool extends Configured implements Tool
 
   private boolean readDataEncRows(Path outPathInit) throws Exception
   {
-    boolean success = false;
+    boolean success;
 
     Job job = new Job(conf, "pirMR");
     job.setSpeculativeExecution(false);
@@ -432,7 +432,7 @@ public class ComputeResponseTool extends Configured implements Tool
 
   private boolean multiplyColumns(Path outPathInit, Path outPathColumnMult) throws IOException, ClassNotFoundException, InterruptedException
   {
-    boolean success = false;
+    boolean success;
 
     Job columnMultJob = new Job(conf, "pir_columnMult");
     columnMultJob.setSpeculativeExecution(false);
@@ -460,7 +460,7 @@ public class ComputeResponseTool extends Configured implements Tool
     FileStatus[] status = fs.listStatus(outPathInit);
     for (FileStatus fstat : status)
     {
-      if (fstat.getPath().getName().toString().startsWith(FileConst.PIR))
+      if (fstat.getPath().getName().startsWith(FileConst.PIR))
       {
         logger.info("fstat.getPath() = " + fstat.getPath().toString());
         FileInputFormat.addInputPath(columnMultJob, fstat.getPath());
@@ -492,7 +492,7 @@ public class ComputeResponseTool extends Configured implements Tool
 
   private boolean computeFinalResponse(Path outPathFinal) throws ClassNotFoundException, IOException, InterruptedException
   {
-    boolean success = false;
+    boolean success;
 
     Job finalResponseJob = new Job(conf, "pir_finalResponse");
     finalResponseJob.setSpeculativeExecution(false);
@@ -522,7 +522,7 @@ public class ComputeResponseTool extends Configured implements Tool
     FileStatus[] status = fs.listStatus(new Path(outputDirColumnMult));
     for (FileStatus fstat : status)
     {
-      if (fstat.getPath().getName().toString().startsWith(FileConst.PIR_COLS))
+      if (fstat.getPath().getName().startsWith(FileConst.PIR_COLS))
       {
         logger.info("fstat.getPath() = " + fstat.getPath().toString());
         FileInputFormat.addInputPath(finalResponseJob, fstat.getPath());

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableMapper.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableMapper.java
index 4b0a3b3..28d49a3 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableMapper.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableMapper.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.IOException;
@@ -26,10 +26,10 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Mapper;
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.ModPowAbstraction;
 import org.apache.pirk.query.wideskies.Query;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to generate the expTable given the input query vectors
@@ -37,15 +37,13 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class ExpTableMapper extends Mapper<LongWritable,Text,Text,Text>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ExpTableMapper.class);
 
-  Text keyOut = null;
-  Text valueOut = null;
+  private Text valueOut = null;
 
-  int dataPartitionBitSize = 0;
-  int maxValue = 0;
-  BigInteger NSquared = null;
-  Query query = null;
+  private int maxValue = 0;
+  private BigInteger NSquared = null;
+  private Query query = null;
 
   @Override
   public void setup(Context ctx) throws IOException, InterruptedException
@@ -58,7 +56,7 @@ public class ExpTableMapper extends Mapper<LongWritable,Text,Text,Text>
     String queryDir = ctx.getConfiguration().get("pirMR.queryInputDir");
     query = Query.readFromHDFSFile(new Path(queryDir), fs);
 
-    dataPartitionBitSize = query.getQueryInfo().getDataPartitionBitSize();
+    int dataPartitionBitSize = query.getQueryInfo().getDataPartitionBitSize();
     maxValue = (int) Math.pow(2, dataPartitionBitSize) - 1;
 
     NSquared = query.getNSquared();

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableReducer.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableReducer.java
index 6bbd89b..fabf679 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableReducer.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/ExpTableReducer.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.IOException;
@@ -23,9 +23,9 @@ import java.io.IOException;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Reducer;
 import org.apache.hadoop.mapreduce.lib.output.MultipleOutputs;
-import org.apache.log4j.Logger;
 import org.apache.pirk.utils.FileConst;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Reducer class to complete the exp lookup table and add to the Query object
@@ -33,16 +33,16 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class ExpTableReducer extends Reducer<Text,Text,Text,Text>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ExpTableReducer.class);
 
   private MultipleOutputs<Text,Text> mos = null;
-  String reducerID = null;
+  private String reducerID = null;
 
   @Override
   public void setup(Context ctx) throws IOException, InterruptedException
   {
     super.setup(ctx);
-    mos = new MultipleOutputs<Text,Text>(ctx);
+    mos = new MultipleOutputs<>(ctx);
     reducerID = String.format("%05d", ctx.getTaskAttemptID().getTaskID().getId());
     logger.info("reducerID = " + reducerID);
   }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/FinalResponseReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/FinalResponseReducer.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/FinalResponseReducer.java
index f9a0881..1df7b0e 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/FinalResponseReducer.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/FinalResponseReducer.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.IOException;
@@ -27,11 +27,11 @@ import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Reducer;
 import org.apache.hadoop.mapreduce.lib.output.MultipleOutputs;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.response.wideskies.Response;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Reducer class to construct the final Response object
@@ -39,28 +39,26 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class FinalResponseReducer extends Reducer<LongWritable,Text,LongWritable,Text>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(FinalResponseReducer.class);
 
-  Text outputValue = null;
   private MultipleOutputs<LongWritable,Text> mos = null;
 
-  Response response = null;
-  String outputFile = null;
-  FileSystem fs = null;
-  QueryInfo queryInfo = null;
+  private Response response = null;
+  private String outputFile = null;
+  private FileSystem fs = null;
 
   @Override
   public void setup(Context ctx) throws IOException, InterruptedException
   {
     super.setup(ctx);
 
-    outputValue = new Text();
-    mos = new MultipleOutputs<LongWritable,Text>(ctx);
+    Text outputValue = new Text();
+    mos = new MultipleOutputs<>(ctx);
 
     fs = FileSystem.newInstance(ctx.getConfiguration());
     String queryDir = ctx.getConfiguration().get("pirMR.queryInputDir");
     Query query = Query.readFromHDFSFile(new Path(queryDir), fs);
-    queryInfo = query.getQueryInfo();
+    QueryInfo queryInfo = query.getQueryInfo();
 
     outputFile = ctx.getConfiguration().get("pirMR.outputFile");
 

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/HashSelectorsAndPartitionDataMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/HashSelectorsAndPartitionDataMapper.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/HashSelectorsAndPartitionDataMapper.java
index c3f672e..95396a9 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/HashSelectorsAndPartitionDataMapper.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/HashSelectorsAndPartitionDataMapper.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.IOException;
@@ -27,7 +27,6 @@ import org.apache.hadoop.io.IntWritable;
 import org.apache.hadoop.io.MapWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Mapper;
-import org.apache.log4j.Logger;
 import org.apache.pirk.inputformat.hadoop.BytesArrayWritable;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.query.wideskies.QueryInfo;
@@ -37,32 +36,31 @@ import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.schema.query.filter.DataFilter;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.StringUtils;
 import org.apache.pirk.utils.SystemConfiguration;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
  * Initialization mapper for PIR
  * <p>
  * Reads in data, extracts the selector by queryType from each dataElement, performs a keyed hash of the selector, extracts the partitions of the dataElement,
- * and emits {@<hash(selector), dataPartitions>}
+ * and emits {@link <hash(selector), dataPartitions>}
  *
  */
 public class HashSelectorsAndPartitionDataMapper extends Mapper<Text,MapWritable,IntWritable,BytesArrayWritable>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(HashSelectorsAndPartitionDataMapper.class);
 
-  IntWritable keyOut = null;
+  private IntWritable keyOut = null;
 
   HashSet<String> stopList = null;
 
-  Query query = null;
-  QueryInfo queryInfo = null;
-  QuerySchema qSchema = null;
-  DataSchema dSchema = null;
-  Object filter = null;
+  private QueryInfo queryInfo = null;
+  private QuerySchema qSchema = null;
+  private DataSchema dSchema = null;
+  private Object filter = null;
 
   @Override
   public void setup(Context ctx) throws IOException, InterruptedException
@@ -77,7 +75,7 @@ public class HashSelectorsAndPartitionDataMapper extends Mapper<Text,MapWritable
 
     // Can make this so that it reads multiple queries at one time...
     String queryDir = ctx.getConfiguration().get("pirMR.queryInputDir");
-    query = Query.readFromHDFSFile(new Path(queryDir), fs);
+    Query query = Query.readFromHDFSFile(new Path(queryDir), fs);
     queryInfo = query.getQueryInfo();
 
     try

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/MRStats.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/MRStats.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/MRStats.java
index fa2d8cf..cce2939 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/MRStats.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/MRStats.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,13 +15,13 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 public class MRStats
 {
-  public static enum Stats
+  public enum Stats
   {
-    NUM_RECORDS_INIT_MAPPER, NUM_RECORDS_PROCESSED_INIT_MAPPER, NUM_HASHES_REDUCER, NUM_COLUMNS;
+    NUM_RECORDS_INIT_MAPPER, NUM_RECORDS_PROCESSED_INIT_MAPPER, NUM_HASHES_REDUCER, NUM_COLUMNS
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/RowCalcReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/RowCalcReducer.java b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/RowCalcReducer.java
index 72a00e6..e35ee84 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/RowCalcReducer.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/mapreduce/RowCalcReducer.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.mapreduce;
 
 import java.io.IOException;
@@ -29,7 +29,6 @@ import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Reducer;
 import org.apache.hadoop.mapreduce.lib.output.MultipleOutputs;
-import org.apache.log4j.Logger;
 import org.apache.pirk.inputformat.hadoop.BytesArrayWritable;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.query.wideskies.QueryInfo;
@@ -39,9 +38,9 @@ import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.utils.FileConst;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -54,22 +53,20 @@ import scala.Tuple2;
  */
 public class RowCalcReducer extends Reducer<IntWritable,BytesArrayWritable,LongWritable,Text>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(RowCalcReducer.class);
 
-  LongWritable keyOut = null;
-  Text valueOut = null;
+  private LongWritable keyOut = null;
+  private Text valueOut = null;
 
   private MultipleOutputs<LongWritable,Text> mos = null;
 
-  FileSystem fs = null;
-  Query query = null;
-  QueryInfo queryInfo = null;
-  QuerySchema qSchema = null;
-  DataSchema dSchema = null;
+  private FileSystem fs = null;
+  private Query query = null;
+  private QueryInfo queryInfo = null;
 
-  boolean useLocalCache = false;
-  boolean limitHitsPerSelector = false;
-  int maxHitsPerSelector = 1000;
+  private boolean useLocalCache = false;
+  private boolean limitHitsPerSelector = false;
+  private int maxHitsPerSelector = 1000;
 
   @Override
   public void setup(Context ctx) throws IOException, InterruptedException
@@ -78,7 +75,7 @@ public class RowCalcReducer extends Reducer<IntWritable,BytesArrayWritable,LongW
 
     keyOut = new LongWritable();
     valueOut = new Text();
-    mos = new MultipleOutputs<LongWritable,Text>(ctx);
+    mos = new MultipleOutputs<>(ctx);
 
     fs = FileSystem.newInstance(ctx.getConfiguration());
     String queryDir = ctx.getConfiguration().get("pirMR.queryInputDir");
@@ -99,8 +96,8 @@ public class RowCalcReducer extends Reducer<IntWritable,BytesArrayWritable,LongW
       e.printStackTrace();
     }
 
-    qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
-    dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
+    QuerySchema qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
+    DataSchema dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
 
     if (ctx.getConfiguration().get("pirWL.useLocalCache").equals("true"))
     {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/Accumulators.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/Accumulators.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/Accumulators.java
index 837c09a..1345fe5 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/Accumulators.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/Accumulators.java
@@ -20,10 +20,10 @@ package org.apache.pirk.responder.wideskies.spark;
 
 import java.io.Serializable;
 
-import org.apache.log4j.Logger;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.Accumulator;
 import org.apache.spark.api.java.JavaSparkContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Accumulators for the Responder
@@ -33,13 +33,13 @@ public class Accumulators implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(Accumulators.class);
 
-  Accumulator<Integer> numRecordsReceived = null;
-  Accumulator<Integer> numRecordsFiltered = null;
-  Accumulator<Integer> numRecordsAfterFilter = null;
-  Accumulator<Integer> numHashes = null;
-  Accumulator<Integer> numColumns = null;
+  private Accumulator<Integer> numRecordsReceived = null;
+  private Accumulator<Integer> numRecordsFiltered = null;
+  private Accumulator<Integer> numRecordsAfterFilter = null;
+  private Accumulator<Integer> numHashes = null;
+  private Accumulator<Integer> numColumns = null;
 
   public Accumulators(JavaSparkContext sc)
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/BroadcastVars.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/BroadcastVars.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/BroadcastVars.java
index b4a2bd6..89ce35f 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/BroadcastVars.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/BroadcastVars.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.io.Serializable;
@@ -33,19 +33,19 @@ public class BroadcastVars implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  transient JavaSparkContext jsc = null;
+  private transient JavaSparkContext jsc = null;
 
   Broadcast<Query> query = null;
 
-  Broadcast<QueryInfo> queryInfo = null;
+  private Broadcast<QueryInfo> queryInfo = null;
 
-  Broadcast<String> useLocalCache = null;
+  private Broadcast<String> useLocalCache = null;
 
-  Broadcast<Boolean> limitHitsPerSelector = null;
+  private Broadcast<Boolean> limitHitsPerSelector = null;
 
-  Broadcast<Integer> maxHitsPerSelector = null;
+  private Broadcast<Integer> maxHitsPerSelector = null;
 
-  Broadcast<String> expDir = null;
+  private Broadcast<String> expDir = null;
 
   public BroadcastVars(JavaSparkContext sc)
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeExpLookupTable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeExpLookupTable.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeExpLookupTable.java
index 0db43f8..938c32e 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeExpLookupTable.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeExpLookupTable.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.io.IOException;
@@ -27,14 +27,13 @@ import java.util.TreeMap;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.Query;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.spark.api.java.JavaRDD;
 import org.apache.spark.api.java.JavaSparkContext;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -43,7 +42,7 @@ import scala.Tuple2;
  */
 public class ComputeExpLookupTable
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ComputeExpLookupTable.class);
 
   /**
    * Method to create the distributed modular exponentiation lookup table in hdfs for a given Query
@@ -64,7 +63,7 @@ public class ComputeExpLookupTable
   public static JavaPairRDD<Integer,Iterable<Tuple2<Integer,BigInteger>>> computeExpTable(JavaSparkContext sc, FileSystem fs, BroadcastVars bVars, Query query,
       String queryInputFile, String outputDirExp, boolean useModExpJoin)
   {
-    JavaPairRDD<Integer,Iterable<Tuple2<Integer,BigInteger>>> expCalculations = null;
+    JavaPairRDD<Integer,Iterable<Tuple2<Integer,BigInteger>>> expCalculations;
 
     logger.info("Creating expTable in hdfs for queryName = " + query.getQueryInfo().getQueryName());
 
@@ -83,7 +82,7 @@ public class ComputeExpLookupTable
 
     // Write the query hashes to a RDD
     TreeMap<Integer,BigInteger> queryElements = query.getQueryElements();
-    ArrayList<Integer> keys = new ArrayList<Integer>(queryElements.keySet());
+    ArrayList<Integer> keys = new ArrayList<>(queryElements.keySet());
 
     int numSplits = Integer.parseInt(SystemConfiguration.getProperty("pir.expCreationSplits", "100"));
     JavaRDD<Integer> queryHashes = sc.parallelize(keys, numSplits);
@@ -100,7 +99,7 @@ public class ComputeExpLookupTable
 
       // Place exp table in query object and in the BroadcastVars
       Map<Integer,String> queryHashFileNameMap = hashToPartition.collectAsMap();
-      query.setExpFileBasedLookup(new HashMap<Integer,String>(queryHashFileNameMap));
+      query.setExpFileBasedLookup(new HashMap<>(queryHashFileNameMap));
       query.writeToHDFSFile(new Path(queryInputFile), fs);
       bVars.setQuery(query);
     }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeResponse.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeResponse.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeResponse.java
index 5391e41..ba7fd12 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeResponse.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/ComputeResponse.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.math.BigInteger;
@@ -28,7 +28,6 @@ import org.apache.hadoop.io.MapWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
-import org.apache.log4j.Logger;
 import org.apache.pirk.inputformat.hadoop.BaseInputFormat;
 import org.apache.pirk.inputformat.hadoop.InputFormatConst;
 import org.apache.pirk.query.wideskies.Query;
@@ -37,7 +36,6 @@ import org.apache.pirk.response.wideskies.Response;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.apache.spark.SparkConf;
@@ -45,7 +43,8 @@ import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.spark.api.java.JavaRDD;
 import org.apache.spark.api.java.JavaSparkContext;
 import org.elasticsearch.hadoop.mr.EsInputFormat;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -62,35 +61,34 @@ import scala.Tuple2;
  */
 public class ComputeResponse
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ComputeResponse.class);
 
-  String dataInputFormat = null;
-  String inputData = null;
-  String outputFile = null;
-  String outputDirExp = null;
+  private String dataInputFormat = null;
+  private String inputData = null;
+  private String outputFile = null;
+  private String outputDirExp = null;
 
-  String queryInput = null;
-  String stopListFile = null;
+  private String queryInput = null;
 
-  String esQuery = "none";
-  String esResource = "none";
+  private String esQuery = "none";
+  private String esResource = "none";
 
-  boolean useHDFSLookupTable = false;
-  boolean useModExpJoin = false;
+  private boolean useHDFSLookupTable = false;
+  private boolean useModExpJoin = false;
 
-  FileSystem fs = null;
-  JavaSparkContext sc = null;
+  private FileSystem fs = null;
+  private JavaSparkContext sc = null;
 
-  Accumulators accum = null;
-  BroadcastVars bVars = null;
+  private Accumulators accum = null;
+  private BroadcastVars bVars = null;
 
-  QueryInfo queryInfo = null;
+  private QueryInfo queryInfo = null;
   Query query = null;
 
-  int numDataPartitions = 0;
-  int numColMultPartitions = 0;
+  private int numDataPartitions = 0;
+  private int numColMultPartitions = 0;
 
-  boolean colMultReduceByKey = false;
+  private boolean colMultReduceByKey = false;
 
   public ComputeResponse(FileSystem fileSys) throws Exception
   {
@@ -129,7 +127,7 @@ public class ComputeResponse
     outputDirExp = outputFile + "_exp";
 
     queryInput = SystemConfiguration.getProperty("pir.queryInput");
-    stopListFile = SystemConfiguration.getProperty("pir.stopListFile");
+    String stopListFile = SystemConfiguration.getProperty("pir.stopListFile");
     useModExpJoin = SystemConfiguration.getProperty("pir.useModExpJoin", "false").equals("true");
 
     logger.info("outputFile = " + outputFile + " queryInputDir = " + queryInput + " stopListFile = " + stopListFile + " esQuery = " + esQuery
@@ -199,7 +197,7 @@ public class ComputeResponse
   /**
    * Method to read in data from an allowed input source/format and perform the query
    */
-  public void performQuery() throws ClassNotFoundException, Exception
+  public void performQuery() throws Exception
   {
     logger.info("Performing query: ");
 
@@ -223,7 +221,7 @@ public class ComputeResponse
   {
     logger.info("Reading data ");
 
-    JavaRDD<MapWritable> dataRDD = null;
+    JavaRDD<MapWritable> dataRDD;
 
     Job job = new Job();
     String baseQuery = SystemConfiguration.getProperty("pir.baseQuery");
@@ -271,7 +269,7 @@ public class ComputeResponse
   {
     logger.info("Reading data ");
 
-    JavaRDD<MapWritable> dataRDD = null;
+    JavaRDD<MapWritable> dataRDD;
 
     Job job = new Job();
     String jobName = "pirSpark_ES_" + esQuery + "_" + System.currentTimeMillis();
@@ -314,7 +312,7 @@ public class ComputeResponse
     JavaPairRDD<Integer,Iterable<ArrayList<BigInteger>>> selectorGroupRDD = selectorHashToDocRDD.groupByKey();
 
     // Calculate the encrypted row values for each row, emit <colNum, colVal> for each row
-    JavaPairRDD<Long,BigInteger> encRowRDD = null;
+    JavaPairRDD<Long,BigInteger> encRowRDD;
     if (useModExpJoin)
     {
       // If we are pre-computing the modular exponentiation table and then joining the data partitions
@@ -347,7 +345,7 @@ public class ComputeResponse
   private void encryptedColumnCalc(JavaPairRDD<Long,BigInteger> encRowRDD) throws PIRException
   {
     // Multiply the column values by colNum: emit <colNum, finalColVal>
-    JavaPairRDD<Long,BigInteger> encColRDD = null;
+    JavaPairRDD<Long,BigInteger> encColRDD;
     if (colMultReduceByKey)
     {
       encColRDD = encRowRDD.reduceByKey(new EncColMultReducer(accum, bVars), numColMultPartitions);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultGroupedMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultGroupedMapper.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultGroupedMapper.java
index 84d00b4..72d6b95 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultGroupedMapper.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultGroupedMapper.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,16 +15,15 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.math.BigInteger;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.Query;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.api.java.function.PairFunction;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -35,19 +34,14 @@ public class EncColMultGroupedMapper implements PairFunction<Tuple2<Long,Iterabl
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
-
-  Accumulators accum = null;
-  BroadcastVars bbVars = null;
+  private static final Logger logger = LoggerFactory.getLogger(EncColMultGroupedMapper.class);
 
   Query query = null;
 
   EncColMultGroupedMapper(Accumulators accumIn, BroadcastVars bbVarsIn)
   {
-    accum = accumIn;
-    bbVars = bbVarsIn;
 
-    query = bbVars.getQuery();
+    query = bbVarsIn.getQuery();
 
     logger.info("Initialized EncColMultReducer");
   }
@@ -66,6 +60,6 @@ public class EncColMultGroupedMapper implements PairFunction<Tuple2<Long,Iterabl
     // long endTime = System.currentTimeMillis();
     // logger.debug("Completed column mult for col = " + colVals._1 + " duration = " + (endTime - startTime));
 
-    return new Tuple2<Long,BigInteger>(colVals._1, colVal);
+    return new Tuple2<>(colVals._1, colVal);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultReducer.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultReducer.java
index f6fe25a..44bce8d 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultReducer.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncColMultReducer.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,15 +15,15 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.math.BigInteger;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.Query;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.api.java.function.Function2;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Function to perform encrypted column multiplication
@@ -33,19 +33,14 @@ public class EncColMultReducer implements Function2<BigInteger,BigInteger,BigInt
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
-
-  Accumulators accum = null;
-  BroadcastVars bbVars = null;
+  private static final Logger logger = LoggerFactory.getLogger(EncColMultReducer.class);
 
   Query query = null;
 
   EncColMultReducer(Accumulators accumIn, BroadcastVars bbVarsIn)
   {
-    accum = accumIn;
-    bbVars = bbVarsIn;
 
-    query = bbVars.getQuery();
+    query = bbVarsIn.getQuery();
 
     logger.info("Initialized EncColMultReducer");
   }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalc.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalc.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalc.java
index af3fd44..2b28c46 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalc.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalc.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.io.IOException;
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.responder.wideskies.common.ComputeEncryptedRow;
@@ -32,9 +31,9 @@ import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.api.java.function.PairFlatMapFunction;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -49,36 +48,32 @@ public class EncRowCalc implements PairFlatMapFunction<Tuple2<Integer,Iterable<A
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(EncRowCalc.class);
 
-  Accumulators accum = null;
-  BroadcastVars bbVars = null;
+  private Accumulators accum = null;
 
-  Query query = null;
-  QueryInfo queryInfo = null;
-  QuerySchema qSchema = null;
-  DataSchema dSchema = null;
+  private Query query = null;
+  private QueryInfo queryInfo = null;
 
-  boolean useLocalCache = false;
-  boolean limitHitsPerSelector = false;
-  int maxHitsPerSelector = 0;
+  private boolean useLocalCache = false;
+  private boolean limitHitsPerSelector = false;
+  private int maxHitsPerSelector = 0;
 
   public EncRowCalc(Accumulators pirWLAccum, BroadcastVars pirWLBBVars)
   {
     accum = pirWLAccum;
-    bbVars = pirWLBBVars;
 
-    query = bbVars.getQuery();
-    queryInfo = bbVars.getQueryInfo();
-    qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
-    dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
+    query = pirWLBBVars.getQuery();
+    queryInfo = pirWLBBVars.getQueryInfo();
+    QuerySchema qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
+    DataSchema dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
 
-    if (bbVars.getUseLocalCache().equals("true"))
+    if (pirWLBBVars.getUseLocalCache().equals("true"))
     {
       useLocalCache = true;
     }
-    limitHitsPerSelector = bbVars.getLimitHitsPerSelector();
-    maxHitsPerSelector = bbVars.getMaxHitsPerSelector();
+    limitHitsPerSelector = pirWLBBVars.getLimitHitsPerSelector();
+    maxHitsPerSelector = pirWLBBVars.getMaxHitsPerSelector();
 
     logger.info("Initialized EncRowCalc - limitHitsPerSelector = " + limitHitsPerSelector + " maxHitsPerSelector = " + maxHitsPerSelector);
   }
@@ -86,7 +81,7 @@ public class EncRowCalc implements PairFlatMapFunction<Tuple2<Integer,Iterable<A
   @Override
   public Iterable<Tuple2<Long,BigInteger>> call(Tuple2<Integer,Iterable<ArrayList<BigInteger>>> hashDocTuple) throws Exception
   {
-    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<Tuple2<Long,BigInteger>>();
+    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<>();
 
     int rowIndex = hashDocTuple._1;
     accum.incNumHashes(1);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalcPrecomputedCache.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalcPrecomputedCache.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalcPrecomputedCache.java
index 6f1b08b..c855aa8 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalcPrecomputedCache.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/EncRowCalcPrecomputedCache.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,14 +15,13 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.responder.wideskies.common.ComputeEncryptedRow;
@@ -30,9 +29,9 @@ import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.api.java.function.PairFlatMapFunction;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -43,39 +42,33 @@ public class EncRowCalcPrecomputedCache implements
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(EncRowCalcPrecomputedCache.class);
 
-  Accumulators accum = null;
-  BroadcastVars bbVars = null;
+  private Accumulators accum = null;
 
   Query query = null;
-  QueryInfo queryInfo = null;
-  QuerySchema qSchema = null;
-  DataSchema dSchema = null;
 
-  boolean useLocalCache = false;
-  boolean limitHitsPerSelector = false;
-  int maxHitsPerSelector = 0;
-  HashMap<Integer,BigInteger> expTable = null;
+  private boolean limitHitsPerSelector = false;
+  private int maxHitsPerSelector = 0;
+  private HashMap<Integer,BigInteger> expTable = null;
 
   public EncRowCalcPrecomputedCache(Accumulators pirWLAccum, BroadcastVars pirWLBBVars)
   {
     accum = pirWLAccum;
-    bbVars = pirWLBBVars;
 
-    query = bbVars.getQuery();
-    queryInfo = bbVars.getQueryInfo();
-    qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
-    dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
+    query = pirWLBBVars.getQuery();
+    QueryInfo queryInfo = pirWLBBVars.getQueryInfo();
+    QuerySchema qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
+    DataSchema dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
 
-    if (bbVars.getUseLocalCache().equals("true"))
+    if (pirWLBBVars.getUseLocalCache().equals("true"))
     {
-      useLocalCache = true;
+      boolean useLocalCache = true;
     }
-    limitHitsPerSelector = bbVars.getLimitHitsPerSelector();
-    maxHitsPerSelector = bbVars.getMaxHitsPerSelector();
+    limitHitsPerSelector = pirWLBBVars.getLimitHitsPerSelector();
+    maxHitsPerSelector = pirWLBBVars.getMaxHitsPerSelector();
 
-    expTable = new HashMap<Integer,BigInteger>();
+    expTable = new HashMap<>();
 
     logger.info("Initialized EncRowCalcPrecomputedCache - limitHitsPerSelector = " + limitHitsPerSelector + " maxHitsPerSelector = " + maxHitsPerSelector);
   }
@@ -84,7 +77,7 @@ public class EncRowCalcPrecomputedCache implements
   public Iterable<Tuple2<Long,BigInteger>> call(Tuple2<Integer,Tuple2<Iterable<Tuple2<Integer,BigInteger>>,Iterable<ArrayList<BigInteger>>>> hashDocTuple)
       throws Exception
   {
-    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<Tuple2<Long,BigInteger>>();
+    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<>();
 
     int rowIndex = hashDocTuple._1;
     accum.incNumHashes(1);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpKeyFilenameMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpKeyFilenameMap.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpKeyFilenameMap.java
index c417a9d..0642e22 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpKeyFilenameMap.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpKeyFilenameMap.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.io.BufferedWriter;
@@ -27,11 +27,10 @@ import java.util.Iterator;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.TaskContext;
 import org.apache.spark.api.java.function.PairFlatMapFunction;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -41,15 +40,13 @@ public class ExpKeyFilenameMap implements PairFlatMapFunction<Iterator<Tuple2<In
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ExpKeyFilenameMap.class);
 
-  BroadcastVars bbVars = null;
-  String expOutDir = null;
+  private String expOutDir = null;
 
   public ExpKeyFilenameMap(BroadcastVars bbVarsIn)
   {
-    bbVars = bbVarsIn;
-    expOutDir = bbVars.getExpDir();
+    expOutDir = bbVarsIn.getExpDir();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpTableGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpTableGenerator.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpTableGenerator.java
index 7ed2a1c..b071f7b 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpTableGenerator.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/ExpTableGenerator.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,18 +15,17 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.ModPowAbstraction;
 import org.apache.pirk.query.wideskies.Query;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.api.java.function.PairFlatMapFunction;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -38,18 +37,16 @@ public class ExpTableGenerator implements PairFlatMapFunction<Integer,Integer,Tu
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ExpTableGenerator.class);
 
-  BroadcastVars bbVars = null;
   Query query = null;
-  BigInteger NSquared = null;
-  int maxValue = 0;
+  private BigInteger NSquared = null;
+  private int maxValue = 0;
 
   public ExpTableGenerator(BroadcastVars bbVarsIn)
   {
-    bbVars = bbVarsIn;
 
-    query = bbVars.getQuery();
+    query = bbVarsIn.getQuery();
     NSquared = query.getNSquared();
 
     int dataPartitionBitSize = query.getQueryInfo().getDataPartitionBitSize();
@@ -60,14 +57,14 @@ public class ExpTableGenerator implements PairFlatMapFunction<Integer,Integer,Tu
   public Iterable<Tuple2<Integer,Tuple2<Integer,BigInteger>>> call(Integer queryHashKey) throws Exception
   {
     // queryHashKey -> <<power>,<element^power mod N^2>>
-    ArrayList<Tuple2<Integer,Tuple2<Integer,BigInteger>>> modExp = new ArrayList<Tuple2<Integer,Tuple2<Integer,BigInteger>>>();
+    ArrayList<Tuple2<Integer,Tuple2<Integer,BigInteger>>> modExp = new ArrayList<>();
 
     BigInteger element = query.getQueryElement(queryHashKey);
     for (int i = 0; i <= maxValue; ++i)
     {
       BigInteger modPow = ModPowAbstraction.modPow(element, BigInteger.valueOf(i), NSquared);
-      Tuple2<Integer,BigInteger> modPowTuple = new Tuple2<Integer,BigInteger>(i, modPow);
-      modExp.add(new Tuple2<Integer,Tuple2<Integer,BigInteger>>(queryHashKey, modPowTuple));
+      Tuple2<Integer,BigInteger> modPowTuple = new Tuple2<>(i, modPow);
+      modExp.add(new Tuple2<>(queryHashKey, modPowTuple));
     }
 
     return modExp;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/FilterData.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/FilterData.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/FilterData.java
index 3eb37f6..2a54a38 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/FilterData.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/FilterData.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,19 +15,19 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import org.apache.hadoop.io.MapWritable;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.schema.query.filter.DataFilter;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.api.java.function.Function;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to filter data as per the provided Filter (via the QuerySchema)
@@ -36,19 +36,17 @@ public class FilterData implements Function<MapWritable,Boolean>
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(FilterData.class);
 
-  Accumulators accum = null;
-  BroadcastVars bbVars = null;
-  DataSchema dSchema = null;
-  Object filter = null;
+  private Accumulators accum = null;
+  private DataSchema dSchema = null;
+  private Object filter = null;
 
   public FilterData(Accumulators accumIn, BroadcastVars bbVarsIn) throws Exception
   {
     accum = accumIn;
-    bbVars = bbVarsIn;
 
-    QueryInfo queryInfo = bbVars.getQueryInfo();
+    QueryInfo queryInfo = bbVarsIn.getQueryInfo();
     QuerySchema qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
     dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
 

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/spark/HashSelectorsAndPartitionData.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/spark/HashSelectorsAndPartitionData.java b/src/main/java/org/apache/pirk/responder/wideskies/spark/HashSelectorsAndPartitionData.java
index b614d42..bbd0edd 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/spark/HashSelectorsAndPartitionData.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/spark/HashSelectorsAndPartitionData.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,23 +15,22 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.spark;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
 
 import org.apache.hadoop.io.MapWritable;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.responder.wideskies.common.HashSelectorAndPartitionData;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.spark.api.java.function.PairFunction;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 
 /**
@@ -43,21 +42,15 @@ public class HashSelectorsAndPartitionData implements PairFunction<MapWritable,I
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(HashSelectorsAndPartitionData.class);
 
-  Accumulators accum = null;
-  BroadcastVars bbVars = null;
-
-  QueryInfo queryInfo = null;
-  QuerySchema qSchema = null;
-  DataSchema dSchema = null;
+  private QueryInfo queryInfo = null;
+  private QuerySchema qSchema = null;
+  private DataSchema dSchema = null;
 
   public HashSelectorsAndPartitionData(Accumulators pirWLAccum, BroadcastVars pirWLBBVars)
   {
-    accum = pirWLAccum;
-    bbVars = pirWLBBVars;
-
-    queryInfo = bbVars.getQueryInfo();
+    queryInfo = pirWLBBVars.getQueryInfo();
     qSchema = LoadQuerySchemas.getSchema(queryInfo.getQueryType());
     dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());
 
@@ -67,7 +60,7 @@ public class HashSelectorsAndPartitionData implements PairFunction<MapWritable,I
   @Override
   public Tuple2<Integer,ArrayList<BigInteger>> call(MapWritable doc) throws Exception
   {
-    Tuple2<Integer,ArrayList<BigInteger>> returnTuple = null;
+    Tuple2<Integer,ArrayList<BigInteger>> returnTuple;
 
     // Extract the selector, compute the hash, and partition the data element according to query type
     returnTuple = HashSelectorAndPartitionData.hashSelectorAndFormPartitionsBigInteger(doc, qSchema, dSchema, queryInfo);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/standalone/Responder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/standalone/Responder.java b/src/main/java/org/apache/pirk/responder/wideskies/standalone/Responder.java
index d851d70..879b618 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/standalone/Responder.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/standalone/Responder.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,28 +15,27 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.standalone;
 
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.TreeMap;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.ModPowAbstraction;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.query.wideskies.QueryUtils;
 import org.apache.pirk.response.wideskies.Response;
 import org.apache.pirk.utils.KeyedHash;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to perform stand alone responder functionalities
@@ -51,18 +50,18 @@ import org.json.simple.parser.JSONParser;
  */
 public class Responder
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(Responder.class);
 
-  Query query = null;
-  QueryInfo queryInfo = null;
+  private Query query = null;
+  private QueryInfo queryInfo = null;
 
-  String queryType = null;
+  private String queryType = null;
 
-  Response response = null;
+  private Response response = null;
 
-  TreeMap<Integer,BigInteger> columns = null; // the column values for the PIR calculations
+  private TreeMap<Integer,BigInteger> columns = null; // the column values for the PIR calculations
 
-  ArrayList<Integer> rowColumnCounters; // keeps track of how many hit partitions have been recorded for each row/selector
+  private ArrayList<Integer> rowColumnCounters; // keeps track of how many hit partitions have been recorded for each row/selector
 
   public Responder(Query queryInput)
   {
@@ -73,10 +72,10 @@ public class Responder
     response = new Response(queryInfo);
 
     // Columns are allocated as needed, initialized to 1
-    columns = new TreeMap<Integer,BigInteger>();
+    columns = new TreeMap<>();
 
     // Initialize row counters
-    rowColumnCounters = new ArrayList<Integer>();
+    rowColumnCounters = new ArrayList<>();
     for (int i = 0; i < Math.pow(2, queryInfo.getHashBitSize()); ++i)
     {
       rowColumnCounters.add(0);
@@ -178,7 +177,7 @@ public class Responder
       BigInteger column = columns.get(i + rowCounter); // the next 'free' column relative to the selector
       logger.debug("Before: columns.get(" + (i + rowCounter) + ") = " + columns.get(i + rowCounter));
 
-      BigInteger exp = null;
+      BigInteger exp;
       if (query.getQueryInfo().getUseExpLookupTable() && !query.getQueryInfo().getUseHDFSExpLookupTable()) // using the standalone
       // lookup table
       {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/response/wideskies/Response.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/response/wideskies/Response.java b/src/main/java/org/apache/pirk/response/wideskies/Response.java
index 6127b06..3d2a3c0 100644
--- a/src/main/java/org/apache/pirk/response/wideskies/Response.java
+++ b/src/main/java/org/apache/pirk/response/wideskies/Response.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.response.wideskies;
 
 import java.io.File;
@@ -30,9 +30,9 @@ import java.util.TreeMap;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.QueryInfo;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to hold the encrypted response elements for the PIR query
@@ -44,17 +44,17 @@ public class Response implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(Response.class);
 
-  QueryInfo queryInfo = null; // holds all query info
+  private QueryInfo queryInfo = null; // holds all query info
 
-  TreeMap<Integer,BigInteger> responseElements = null; // encrypted response columns, colNum -> column
+  private TreeMap<Integer,BigInteger> responseElements = null; // encrypted response columns, colNum -> column
 
   public Response(QueryInfo queryInfoInput)
   {
     queryInfo = queryInfoInput;
 
-    responseElements = new TreeMap<Integer,BigInteger>();
+    responseElements = new TreeMap<>();
   }
 
   public TreeMap<Integer,BigInteger> getResponseElements()

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/data/DataSchema.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/data/DataSchema.java b/src/main/java/org/apache/pirk/schema/data/DataSchema.java
index 11c3c8e..e0512bb 100644
--- a/src/main/java/org/apache/pirk/schema/data/DataSchema.java
+++ b/src/main/java/org/apache/pirk/schema/data/DataSchema.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.data;
 
 import java.io.Serializable;
@@ -23,10 +23,10 @@ import java.util.HashMap;
 import java.util.HashSet;
 
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.partitioner.DataPartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to hold a data schema
@@ -35,21 +35,21 @@ public class DataSchema implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(DataSchema.class);
 
-  String schemaName = null;
+  private String schemaName = null;
 
-  String primitiveTypePartitionerName = null;
+  private String primitiveTypePartitionerName = null;
 
-  transient HashMap<String,Text> textRep = null; // string element name -> Text representation
+  private transient HashMap<String,Text> textRep = null; // string element name -> Text representation
 
-  transient HashMap<String,Object> partitionerInstances = null; // partitioner class name -> Text representation
+  private transient HashMap<String,Object> partitionerInstances = null; // partitioner class name -> Text representation
 
-  HashMap<String,String> typeMap = null; // string element name -> java type
+  private HashMap<String,String> typeMap = null; // string element name -> java type
 
-  HashMap<String,String> partitionerMap = null; // string element name -> partitioner class name
+  private HashMap<String,String> partitionerMap = null; // string element name -> partitioner class name
 
-  HashSet<String> listRep = null; // elements that are list/array types
+  private HashSet<String> listRep = null; // elements that are list/array types
 
   public DataSchema(String schemaNameInput, HashMap<String,Text> textRepInput, HashSet<String> listRepInput, HashMap<String,String> typeMapInput,
       HashMap<String,String> partitionerMapInput)
@@ -78,7 +78,7 @@ public class DataSchema implements Serializable
 
   private void constructTextRep()
   {
-    textRep = new HashMap<String,Text>();
+    textRep = new HashMap<>();
     for (String name : typeMap.keySet())
     {
       textRep.put(name, new Text(name));
@@ -101,7 +101,7 @@ public class DataSchema implements Serializable
 
   private void constructPartitionerInstances() throws Exception
   {
-    partitionerInstances = new HashMap<String,Object>();
+    partitionerInstances = new HashMap<>();
     for (String partitionerName : partitionerMap.values())
     {
       if (!partitionerInstances.containsKey(partitionerName))
@@ -202,7 +202,7 @@ public class DataSchema implements Serializable
 
   public HashSet<String> getNonListRep()
   {
-    HashSet<String> elements = new HashSet<String>();
+    HashSet<String> elements = new HashSet<>();
     elements.addAll(textRep.keySet());
     elements.removeAll(listRep);
     return elements;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/data/LoadDataSchemas.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/data/LoadDataSchemas.java b/src/main/java/org/apache/pirk/schema/data/LoadDataSchemas.java
index 5bbe754..73995e8 100644
--- a/src/main/java/org/apache/pirk/schema/data/LoadDataSchemas.java
+++ b/src/main/java/org/apache/pirk/schema/data/LoadDataSchemas.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.data;
 
 import java.io.File;
@@ -30,11 +30,11 @@ import javax.xml.parsers.DocumentBuilderFactory;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.partitioner.DataPartitioner;
 import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -64,11 +64,11 @@ import org.w3c.dom.NodeList;
  */
 public class LoadDataSchemas
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(LoadDataSchemas.class);
 
-  public static HashMap<String,DataSchema> schemaMap;
+  private static HashMap<String,DataSchema> schemaMap;
 
-  public static HashSet<String> allowedPrimitiveJavaTypes = new HashSet<String>(Arrays.asList(PrimitiveTypePartitioner.BYTE, PrimitiveTypePartitioner.SHORT,
+  private static HashSet<String> allowedPrimitiveJavaTypes = new HashSet<>(Arrays.asList(PrimitiveTypePartitioner.BYTE, PrimitiveTypePartitioner.SHORT,
       PrimitiveTypePartitioner.INT, PrimitiveTypePartitioner.LONG, PrimitiveTypePartitioner.FLOAT, PrimitiveTypePartitioner.DOUBLE,
       PrimitiveTypePartitioner.CHAR, PrimitiveTypePartitioner.STRING));
 
@@ -76,7 +76,7 @@ public class LoadDataSchemas
   {
     logger.info("Loading data schemas: ");
 
-    schemaMap = new HashMap<String,DataSchema>();
+    schemaMap = new HashMap<>();
     try
     {
       initialize();
@@ -126,21 +126,21 @@ public class LoadDataSchemas
 
   private static DataSchema loadDataSchemaFile(String schemaFile, boolean hdfs, FileSystem fs) throws Exception
   {
-    DataSchema dataSchema = null;
+    DataSchema dataSchema;
 
     // Initialize the elements needed to create the DataSchema
-    String schemaName = null;
-    HashMap<String,Text> textRep = new HashMap<String,Text>();
-    HashSet<String> listRep = new HashSet<String>();
-    HashMap<String,String> typeMap = new HashMap<String,String>();
-    HashMap<String,String> partitionerMap = new HashMap<String,String>();
-    HashMap<String,Object> partitionerInstances = new HashMap<String,Object>();
+    String schemaName;
+    HashMap<String,Text> textRep = new HashMap<>();
+    HashSet<String> listRep = new HashSet<>();
+    HashMap<String,String> typeMap = new HashMap<>();
+    HashMap<String,String> partitionerMap = new HashMap<>();
+    HashMap<String,Object> partitionerInstances = new HashMap<>();
 
     DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
     DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
 
     // Read in and parse the schema file
-    Document doc = null;
+    Document doc;
     if (hdfs)
     {
       Path filePath = new Path(schemaFile);



[4/4] incubator-pirk git commit: PIRK-11 Switch to SLF4J with Log4j2 bindings, including other minor cleanup - closes apache/incubator-pirk#20

Posted by ea...@apache.org.
PIRK-11 Switch to SLF4J with Log4j2 bindings, including other minor cleanup - closes apache/incubator-pirk#20


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

Branch: refs/heads/master
Commit: ef8d1c1a56093d8da617652bef1fbe8a35ea6987
Parents: ec51044
Author: smarthi <sm...@apache.org>
Authored: Sat Jul 23 11:28:58 2016 -0400
Committer: eawilliams <ea...@apache.org>
Committed: Sat Jul 23 11:28:58 2016 -0400

----------------------------------------------------------------------
 pom.xml                                         |  14 +++
 .../pirk/benchmark/PaillierBenchmark.java       |  10 +-
 .../pirk/encryption/ModPowAbstraction.java      |   4 +-
 .../org/apache/pirk/encryption/Paillier.java    |  10 +-
 .../apache/pirk/encryption/PrimeGenerator.java  |  42 +++----
 .../inputformat/hadoop/BaseInputFormat.java     |   4 +-
 .../inputformat/hadoop/BytesArrayWritable.java  |  17 +--
 .../inputformat/hadoop/InputFormatConst.java    |   6 +-
 .../inputformat/hadoop/TextArrayWritable.java   |   4 +-
 .../hadoop/json/JSONInputFormatBase.java        |   6 +-
 .../hadoop/json/JSONRecordReader.java           |  25 ++--
 .../apache/pirk/querier/wideskies/Querier.java  |  34 ++----
 .../pirk/querier/wideskies/QuerierConst.java    |   4 +-
 .../pirk/querier/wideskies/QuerierDriver.java   |  18 +--
 .../querier/wideskies/QuerierDriverCLI.java     |  15 ++-
 .../wideskies/decrypt/DecryptResponse.java      |  26 ++--
 .../decrypt/DecryptResponseRunnable.java        |  26 ++--
 .../querier/wideskies/encrypt/EncryptQuery.java |  34 +++---
 .../wideskies/encrypt/EncryptQueryRunnable.java |  22 ++--
 .../wideskies/encrypt/ExpTableRunnable.java     |  22 ++--
 .../org/apache/pirk/query/wideskies/Query.java  |  48 ++++----
 .../apache/pirk/query/wideskies/QueryInfo.java  |  40 +++----
 .../apache/pirk/query/wideskies/QueryUtils.java |  29 ++---
 .../pirk/responder/wideskies/ResponderCLI.java  |  28 ++---
 .../responder/wideskies/ResponderDriver.java    |   4 +-
 .../wideskies/common/ComputeEncryptedRow.java   |  53 ++++-----
 .../common/HashSelectorAndPartitionData.java    |  23 ++--
 .../wideskies/mapreduce/ColumnMultMapper.java   |  14 +--
 .../wideskies/mapreduce/ColumnMultReducer.java  |  16 +--
 .../mapreduce/ComputeResponseTool.java          |  72 +++++------
 .../wideskies/mapreduce/ExpTableMapper.java     |  22 ++--
 .../wideskies/mapreduce/ExpTableReducer.java    |  14 +--
 .../mapreduce/FinalResponseReducer.java         |  24 ++--
 .../HashSelectorsAndPartitionDataMapper.java    |  26 ++--
 .../responder/wideskies/mapreduce/MRStats.java  |   8 +-
 .../wideskies/mapreduce/RowCalcReducer.java     |  35 +++---
 .../responder/wideskies/spark/Accumulators.java |  16 +--
 .../wideskies/spark/BroadcastVars.java          |  16 +--
 .../wideskies/spark/ComputeExpLookupTable.java  |  17 ++-
 .../wideskies/spark/ComputeResponse.java        |  58 +++++----
 .../spark/EncColMultGroupedMapper.java          |  20 ++--
 .../wideskies/spark/EncColMultReducer.java      |  17 +--
 .../responder/wideskies/spark/EncRowCalc.java   |  43 +++----
 .../spark/EncRowCalcPrecomputedCache.java       |  45 +++----
 .../wideskies/spark/ExpKeyFilenameMap.java      |  17 ++-
 .../wideskies/spark/ExpTableGenerator.java      |  25 ++--
 .../responder/wideskies/spark/FilterData.java   |  20 ++--
 .../spark/HashSelectorsAndPartitionData.java    |  27 ++---
 .../wideskies/standalone/Responder.java         |  29 +++--
 .../pirk/response/wideskies/Response.java       |  16 +--
 .../org/apache/pirk/schema/data/DataSchema.java |  30 ++---
 .../pirk/schema/data/LoadDataSchemas.java       |  32 ++---
 .../data/partitioner/DataPartitioner.java       |  16 +--
 .../data/partitioner/IPDataPartitioner.java     |  12 +-
 .../partitioner/ISO8601DatePartitioner.java     |   6 +-
 .../partitioner/PrimitiveTypePartitioner.java   |  12 +-
 .../pirk/schema/query/LoadQuerySchemas.java     |  26 ++--
 .../apache/pirk/schema/query/QuerySchema.java   |  22 ++--
 .../pirk/schema/query/filter/DataFilter.java    |   4 +-
 .../pirk/schema/query/filter/FilterFactory.java |  10 +-
 .../schema/query/filter/StopListFilter.java     |  14 +--
 .../pirk/schema/response/QueryResponseJSON.java |  22 ++--
 .../test/distributed/DistributedTestCLI.java    |  14 +--
 .../test/distributed/DistributedTestDriver.java |  10 +-
 .../distributed/testsuite/DistTestSuite.java    |  14 +--
 .../org/apache/pirk/test/utils/BaseTests.java   |  51 ++++----
 .../java/org/apache/pirk/test/utils/Inputs.java |  65 +++++-----
 .../apache/pirk/test/utils/StandaloneQuery.java |  20 ++--
 .../org/apache/pirk/test/utils/TestUtils.java   |  20 ++--
 .../org/apache/pirk/utils/CSVOutputUtils.java   |   9 +-
 .../org/apache/pirk/utils/EpochDateParser.java  |   9 +-
 .../java/org/apache/pirk/utils/FileConst.java   |   4 +-
 .../java/org/apache/pirk/utils/FileIOUtils.java |   9 +-
 src/main/java/org/apache/pirk/utils/HDFS.java   |  11 +-
 .../apache/pirk/utils/ISO8601DateParser.java    |  11 +-
 .../java/org/apache/pirk/utils/KeyedHash.java   |  13 +-
 .../java/org/apache/pirk/utils/LogUtils.java    | 119 -------------------
 .../org/apache/pirk/utils/PIRException.java     |   4 +-
 .../org/apache/pirk/utils/QueryParserUtils.java |  46 +++----
 .../org/apache/pirk/utils/StopListUtils.java    |   4 +-
 .../java/org/apache/pirk/utils/StringUtils.java |  17 ++-
 .../apache/pirk/utils/SystemConfiguration.java  |  29 ++---
 .../test/general/ISO8601DateParserTest.java     |  13 +-
 src/test/java/test/general/KeyedHashTest.java   |  13 +-
 src/test/java/test/general/PaillierTest.java    |  64 +++++-----
 .../java/test/general/PartitionUtilsTest.java   |  23 ++--
 .../java/test/general/QueryParserUtilsTest.java |  23 ++--
 .../test/schema/data/LoadDataSchemaTest.java    |  29 +++--
 .../test/schema/query/LoadQuerySchemaTest.java  |  41 +++----
 .../wideskies/standalone/StandaloneTest.java    |  12 +-
 90 files changed, 938 insertions(+), 1130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 996c629..20db598 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,6 +80,7 @@
 		<jmh.version>1.11.3</jmh.version>
 		<benchmarkjar.name>benchmarks</benchmarkjar.name>
 		<javac.target>1.7</javac.target>
+		<slf4j.version>1.7.21</slf4j.version>
 	</properties>
 
 	<dependencies>
@@ -181,6 +182,19 @@
 			<version>${jmh.version}</version>
 		</dependency>
 
+		<!-- Sl4j modules -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-slf4j-impl</artifactId>
+			<version>2.6.2</version>
+		</dependency>
+
 	</dependencies>
 
 	<build>

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/benchmark/PaillierBenchmark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/benchmark/PaillierBenchmark.java b/src/main/java/org/apache/pirk/benchmark/PaillierBenchmark.java
index dd6b57f..3ffee5f 100644
--- a/src/main/java/org/apache/pirk/benchmark/PaillierBenchmark.java
+++ b/src/main/java/org/apache/pirk/benchmark/PaillierBenchmark.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,16 +15,14 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 
 package org.apache.pirk.benchmark;
 
 import java.math.BigInteger;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.ModPowAbstraction;
 import org.apache.pirk.encryption.Paillier;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.openjdk.jmh.annotations.Benchmark;
@@ -33,6 +31,8 @@ import org.openjdk.jmh.annotations.Mode;
 import org.openjdk.jmh.annotations.Scope;
 import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A JMH benchmark to evaluate Paillier performance both with and without using com.square.jnagmp.gmp to accelerate modPow
@@ -43,7 +43,7 @@ import org.openjdk.jmh.annotations.State;
 public class PaillierBenchmark
 {
   private static final int MODULUS_SIZE = 3074;
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(PaillierBenchmark.class);
 
   @State(Scope.Benchmark)
   public static class PaillierBenchmarkState

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/encryption/ModPowAbstraction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/encryption/ModPowAbstraction.java b/src/main/java/org/apache/pirk/encryption/ModPowAbstraction.java
index 350b3a6..4fd2dcd 100644
--- a/src/main/java/org/apache/pirk/encryption/ModPowAbstraction.java
+++ b/src/main/java/org/apache/pirk/encryption/ModPowAbstraction.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.encryption;
 
 import java.math.BigInteger;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/encryption/Paillier.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/encryption/Paillier.java b/src/main/java/org/apache/pirk/encryption/Paillier.java
index 27b1774..b3d1a7a 100644
--- a/src/main/java/org/apache/pirk/encryption/Paillier.java
+++ b/src/main/java/org/apache/pirk/encryption/Paillier.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.encryption;
 
 import java.io.Serializable;
@@ -23,10 +23,10 @@ import java.math.BigInteger;
 import java.security.GeneralSecurityException;
 import java.security.SecureRandom;
 
-import org.apache.log4j.Logger;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Implementation of the Paillier cryptosystem
@@ -69,7 +69,7 @@ public class Paillier implements Cloneable, Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(Paillier.class);
 
   private static final SecureRandom secureRandom;
 

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/encryption/PrimeGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/encryption/PrimeGenerator.java b/src/main/java/org/apache/pirk/encryption/PrimeGenerator.java
index 01684aa..f529df0 100644
--- a/src/main/java/org/apache/pirk/encryption/PrimeGenerator.java
+++ b/src/main/java/org/apache/pirk/encryption/PrimeGenerator.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.encryption;
 
 import java.math.BigDecimal;
@@ -23,9 +23,9 @@ import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.Random;
 
-import org.apache.log4j.Logger;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to generate the primes used in the Paillier cryptosystem
@@ -53,10 +53,10 @@ import org.apache.pirk.utils.SystemConfiguration;
  */
 public class PrimeGenerator
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(PrimeGenerator.class);
 
-  private static final HashMap<Integer,BigInteger> lowerBoundCache = new HashMap<Integer,BigInteger>();
-  private static final HashMap<Integer,BigInteger> minimumDifferenceCache = new HashMap<Integer,BigInteger>();
+  private static final HashMap<Integer,BigInteger> lowerBoundCache = new HashMap<>();
+  private static final HashMap<Integer,BigInteger> minimumDifferenceCache = new HashMap<>();
 
   private static boolean additionalChecksEnabled = SystemConfiguration.getProperty("pallier.FIPSPrimeGenerationChecks").equals("true");
 
@@ -69,7 +69,7 @@ public class PrimeGenerator
    */
   public static BigInteger getSinglePrime(int bitLength, int certainty, Random rnd)
   {
-    BigInteger p = null;
+    BigInteger p;
 
     logger.debug("bitLength " + bitLength + " certainty " + certainty + " random " + rnd);
 
@@ -85,15 +85,15 @@ public class PrimeGenerator
       int roundsLeft = calcNumAdditionalMillerRabinRounds(bitLength);
 
       // Calculate the lower bound (\sqrt(2))(2^(bitLength/2) \u2013 1)) for use in FIPS 186-4 B.3.3, step 4.4
-      BigInteger lowerBound = null;
-      if (!lowerBoundCache.containsKey(Integer.valueOf(bitLength)))
+      BigInteger lowerBound;
+      if (!lowerBoundCache.containsKey(bitLength))
       {
         lowerBound = BigDecimal.valueOf(Math.sqrt(2)).multiply(BigDecimal.valueOf(2).pow((bitLength / 2) - 1)).toBigInteger();
-        lowerBoundCache.put(Integer.valueOf(bitLength), lowerBound);
+        lowerBoundCache.put(bitLength, lowerBound);
       }
       else
       {
-        lowerBound = lowerBoundCache.get(Integer.valueOf(bitLength));
+        lowerBound = lowerBoundCache.get(bitLength);
       }
 
       // Complete FIPS 186-4 B.3.3, steps 4.2 - 4.5
@@ -130,7 +130,7 @@ public class PrimeGenerator
    */
   public static BigInteger getSecondPrime(int bitLength, int certainty, Random rnd, BigInteger p)
   {
-    BigInteger q = null;
+    BigInteger q;
 
     logger.debug("bitLength " + bitLength + " certainty " + certainty + " random " + rnd);
 
@@ -146,27 +146,27 @@ public class PrimeGenerator
       int roundsLeft = calcNumAdditionalMillerRabinRounds(bitLength);
 
       // Calculate the lower bound (\sqrt(2))(2^(bitLength/2) \u2013 1)) for use in FIPS 186-4 B.3.3, step 5.5
-      BigInteger lowerBound = null;
-      if (!lowerBoundCache.containsKey(Integer.valueOf(bitLength)))
+      BigInteger lowerBound;
+      if (!lowerBoundCache.containsKey(bitLength))
       {
         lowerBound = BigDecimal.valueOf(Math.sqrt(2)).multiply(BigDecimal.valueOf(2).pow((bitLength / 2) - 1)).toBigInteger();
-        lowerBoundCache.put(Integer.valueOf(bitLength), lowerBound);
+        lowerBoundCache.put(bitLength, lowerBound);
       }
       else
       {
-        lowerBound = lowerBoundCache.get(Integer.valueOf(bitLength));
+        lowerBound = lowerBoundCache.get(bitLength);
       }
 
       // Compute the minimumDifference 2^((bitLength/2) \u2013 100) for use in FIPS 186-4 B.3.3, step 5.4
-      BigInteger minimumDifference = null;
-      if (!minimumDifferenceCache.containsKey(Integer.valueOf(bitLength)))
+      BigInteger minimumDifference;
+      if (!minimumDifferenceCache.containsKey(bitLength))
       {
         minimumDifference = BigDecimal.valueOf(2).pow(bitLength / 2 - 100).toBigInteger();
-        minimumDifferenceCache.put(Integer.valueOf(bitLength), minimumDifference);
+        minimumDifferenceCache.put(bitLength, minimumDifference);
       }
       else
       {
-        minimumDifference = minimumDifferenceCache.get(Integer.valueOf(bitLength));
+        minimumDifference = minimumDifferenceCache.get(bitLength);
       }
 
       // Complete FIPS 186-4 B.3.3, steps 5.2 - 5.6

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/inputformat/hadoop/BaseInputFormat.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/inputformat/hadoop/BaseInputFormat.java b/src/main/java/org/apache/pirk/inputformat/hadoop/BaseInputFormat.java
index 7bd6c1e..1445432 100644
--- a/src/main/java/org/apache/pirk/inputformat/hadoop/BaseInputFormat.java
+++ b/src/main/java/org/apache/pirk/inputformat/hadoop/BaseInputFormat.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.inputformat.hadoop;
 
 import org.apache.hadoop.mapreduce.InputFormat;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/inputformat/hadoop/BytesArrayWritable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/inputformat/hadoop/BytesArrayWritable.java b/src/main/java/org/apache/pirk/inputformat/hadoop/BytesArrayWritable.java
index 53aab08..48078df 100644
--- a/src/main/java/org/apache/pirk/inputformat/hadoop/BytesArrayWritable.java
+++ b/src/main/java/org/apache/pirk/inputformat/hadoop/BytesArrayWritable.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.inputformat.hadoop;
 
 import java.io.ByteArrayOutputStream;
@@ -26,8 +26,8 @@ import java.util.Arrays;
 
 import org.apache.hadoop.io.ArrayWritable;
 import org.apache.hadoop.io.BytesWritable;
-import org.apache.log4j.Logger;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ArrayWritable class with ByteWritable entries
@@ -35,7 +35,7 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class BytesArrayWritable extends ArrayWritable
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(BytesArrayWritable.class);
 
   public BytesArrayWritable()
   {
@@ -147,16 +147,11 @@ public class BytesArrayWritable extends ArrayWritable
   // assumes big endian ordering -- will not change value
   private byte[] pad(byte[] bytes) throws IOException
   {
-    byte[] paddedBytes = null;
-
     byte[] zeroByte = new byte[] {0};
 
     ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
     outputStream.write(zeroByte);
     outputStream.write(bytes);
-
-    paddedBytes = outputStream.toByteArray();
-
-    return paddedBytes;
+    return outputStream.toByteArray();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/inputformat/hadoop/InputFormatConst.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/inputformat/hadoop/InputFormatConst.java b/src/main/java/org/apache/pirk/inputformat/hadoop/InputFormatConst.java
index d45d900..d904c53 100644
--- a/src/main/java/org/apache/pirk/inputformat/hadoop/InputFormatConst.java
+++ b/src/main/java/org/apache/pirk/inputformat/hadoop/InputFormatConst.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.inputformat.hadoop;
 
 import java.util.ArrayList;
@@ -30,5 +30,5 @@ public class InputFormatConst
 
   public static String ES = "elasticsearch";
 
-  public static ArrayList<String> ALLOWED_FORMATS = new ArrayList<String>(Arrays.asList(BASE_FORMAT, ES));
+  public static ArrayList<String> ALLOWED_FORMATS = new ArrayList<>(Arrays.asList(BASE_FORMAT, ES));
 }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/inputformat/hadoop/TextArrayWritable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/inputformat/hadoop/TextArrayWritable.java b/src/main/java/org/apache/pirk/inputformat/hadoop/TextArrayWritable.java
index 371f811..fe4625b 100644
--- a/src/main/java/org/apache/pirk/inputformat/hadoop/TextArrayWritable.java
+++ b/src/main/java/org/apache/pirk/inputformat/hadoop/TextArrayWritable.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.inputformat.hadoop;
 
 import java.math.BigInteger;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONInputFormatBase.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONInputFormatBase.java b/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONInputFormatBase.java
index 67204e6..67e40c7 100644
--- a/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONInputFormatBase.java
+++ b/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONInputFormatBase.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.inputformat.hadoop.json;
 
 import java.io.IOException;
@@ -34,7 +34,7 @@ import org.apache.pirk.inputformat.hadoop.BaseInputFormat;
  */
 public class JSONInputFormatBase extends BaseInputFormat<Text,MapWritable>
 {
-  JSONInputFormat jsonInputFormat = new JSONInputFormat();
+  private JSONInputFormat jsonInputFormat = new JSONInputFormat();
 
   @Override
   public RecordReader<Text,MapWritable> createRecordReader(InputSplit arg0, TaskAttemptContext arg1) throws IOException, InterruptedException

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONRecordReader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONRecordReader.java b/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONRecordReader.java
index ab92401..80fd64f 100644
--- a/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONRecordReader.java
+++ b/src/main/java/org/apache/pirk/inputformat/hadoop/json/JSONRecordReader.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.inputformat.hadoop.json;
 
 import java.io.IOException;
@@ -28,17 +28,17 @@ import org.apache.hadoop.mapreduce.InputSplit;
 import org.apache.hadoop.mapreduce.RecordReader;
 import org.apache.hadoop.mapreduce.TaskAttemptContext;
 import org.apache.hadoop.mapreduce.lib.input.LineRecordReader;
-import org.apache.log4j.Logger;
 import org.apache.pirk.inputformat.hadoop.TextArrayWritable;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.QueryParserUtils;
 import org.apache.pirk.utils.StringUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Record reader to parse files of JSON string representations, one per line
@@ -46,14 +46,14 @@ import org.json.simple.parser.ParseException;
  */
 public class JSONRecordReader extends RecordReader<Text,MapWritable>
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(JSONRecordReader.class);
 
-  LineRecordReader lineReader = null;
-  Text key = null;
-  MapWritable value = null;
-  JSONParser jsonParser = null;
-  String queryString = null;
-  DataSchema dataSchema = null;
+  private LineRecordReader lineReader = null;
+  private Text key = null;
+  private MapWritable value = null;
+  private JSONParser jsonParser = null;
+  private String queryString = null;
+  private DataSchema dataSchema = null;
 
   @Override
   public void initialize(InputSplit inputSplit, TaskAttemptContext context) throws IOException
@@ -154,8 +154,7 @@ public class JSONRecordReader extends RecordReader<Text,MapWritable>
       toMapWritable(line);
 
       // Check to see if the record satisfies the query
-      boolean satisfiesQuery = QueryParserUtils.checkRecord(queryString, value, dataSchema);
-      return satisfiesQuery;
+      return QueryParserUtils.checkRecord(queryString, value, dataSchema);
 
     } catch (ParseException e)
     {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/Querier.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/Querier.java b/src/main/java/org/apache/pirk/querier/wideskies/Querier.java
index 25b4b41..7ffc7a0 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/Querier.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/Querier.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,12 +15,11 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies;
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
@@ -29,11 +28,11 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.query.wideskies.Query;
 import org.apache.pirk.query.wideskies.QueryInfo;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to hold the information necessary for the PIR querier to perform decryption
@@ -43,20 +42,20 @@ public class Querier implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(Querier.class);
 
-  QueryInfo queryInfo = null;
+  private QueryInfo queryInfo = null;
 
-  Query query = null; // contains the query vectors and functionality
+  private Query query = null; // contains the query vectors and functionality
 
-  Paillier paillier = null; // Paillier encryption functionality
+  private Paillier paillier = null; // Paillier encryption functionality
 
-  ArrayList<String> selectors = null; // selectors for the watchlist
+  private ArrayList<String> selectors = null; // selectors for the watchlist
 
   // map to check the embedded selectors in the results for false positives;
   // if the selector is a fixed size < 32 bits, it is included as is
   // if the selector is of variable lengths
-  HashMap<Integer,String> embedSelectorMap = null;
+  private HashMap<Integer,String> embedSelectorMap = null;
 
   public Querier(QueryInfo queryInfoInput, ArrayList<String> selectorsInput, Paillier paillierInput, Query pirQueryInput,
       HashMap<Integer,String> embedSelectorMapInput)
@@ -138,9 +137,8 @@ public class Querier implements Serializable
    */
   public static Querier readFromFile(String filename) throws IOException
   {
-    Querier querier = readFromFile(new File(filename));
 
-    return querier;
+    return readFromFile(new File(filename));
   }
 
   /**
@@ -151,19 +149,13 @@ public class Querier implements Serializable
     Querier querier = null;
 
     FileInputStream fIn = null;
-    ObjectInputStream oIn = null;
+    ObjectInputStream oIn;
     try
     {
       fIn = new FileInputStream(file);
       oIn = new ObjectInputStream(fIn);
       querier = (Querier) oIn.readObject();
-    } catch (FileNotFoundException e)
-    {
-      e.printStackTrace();
-    } catch (IOException e)
-    {
-      e.printStackTrace();
-    } catch (ClassNotFoundException e)
+    } catch (IOException | ClassNotFoundException e)
     {
       e.printStackTrace();
     } finally

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/QuerierConst.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/QuerierConst.java b/src/main/java/org/apache/pirk/querier/wideskies/QuerierConst.java
index eeab489..a034461 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/QuerierConst.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/QuerierConst.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriver.java b/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriver.java
index 916489c..01a6c86 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriver.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriver.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies;
 
 import java.io.IOException;
@@ -23,7 +23,6 @@ import java.io.Serializable;
 import java.math.BigInteger;
 import java.util.ArrayList;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.querier.wideskies.decrypt.DecryptResponse;
 import org.apache.pirk.querier.wideskies.encrypt.EncryptQuery;
@@ -31,9 +30,10 @@ import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.response.wideskies.Response;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.utils.FileIOUtils;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Driver class for encryption of a query or decryption of a response
@@ -72,16 +72,16 @@ import org.apache.pirk.utils.SystemConfiguration;
 public class QuerierDriver implements Serializable
 {
   private static final long serialVersionUID = 1L;
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(QuerierDriver.class);
 
   public static void main(String... args) throws IOException, InterruptedException, PIRException
   {
     // General variables
-    String action = null;
-    String inputFile = null;
-    String outputFile = null;
+    String action;
+    String inputFile;
+    String outputFile;
     String queryType = null;
-    int numThreads = 1;
+    int numThreads;
 
     // Encryption variables
     int hashBitSize = 0;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriverCLI.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriverCLI.java b/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriverCLI.java
index e2c1adf..9012b51 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriverCLI.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/QuerierDriverCLI.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies;
 
 import org.apache.commons.cli.CommandLine;
@@ -24,22 +24,21 @@ import org.apache.commons.cli.GnuParser;
 import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.apache.log4j.Logger;
-import org.apache.pirk.querier.wideskies.QuerierConst;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class for parsing the command line options for the QuerierDriver
  */
 public class QuerierDriverCLI
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(QuerierDriverCLI.class);
 
-  Options cliOptions = null;
-  CommandLine commandLine = null;
+  private Options cliOptions = null;
+  private CommandLine commandLine = null;
 
   // General variables
   public static String ACTION = "action";

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponse.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponse.java b/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponse.java
index 63ae9b9..8eebf82 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponse.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponse.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies.decrypt;
 
 import java.io.BufferedWriter;
@@ -31,14 +31,14 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.querier.wideskies.Querier;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.response.wideskies.Response;
 import org.apache.pirk.schema.response.QueryResponseJSON;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to perform PIR decryption
@@ -46,20 +46,20 @@ import org.apache.pirk.utils.PIRException;
  */
 public class DecryptResponse
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(DecryptResponse.class);
 
-  Response response = null;
+  private Response response = null;
 
-  Querier querier = null;
+  private Querier querier = null;
 
-  HashMap<String,ArrayList<QueryResponseJSON>> resultMap = null; // selector -> ArrayList of hits
+  private HashMap<String,ArrayList<QueryResponseJSON>> resultMap = null; // selector -> ArrayList of hits
 
   public DecryptResponse(Response responseInput, Querier querierInput)
   {
     response = responseInput;
     querier = querierInput;
 
-    resultMap = new HashMap<String,ArrayList<QueryResponseJSON>>();
+    resultMap = new HashMap<>();
   }
 
   /**
@@ -98,7 +98,7 @@ public class DecryptResponse
     int dataPartitionBitSize = queryInfo.getDataPartitionBitSize();
 
     // Initialize the result map and masks-- removes initialization checks from code below
-    HashMap<String,BigInteger> selectorMaskMap = new HashMap<String,BigInteger>();
+    HashMap<String,BigInteger> selectorMaskMap = new HashMap<>();
     int selectorNum = 0;
     BigInteger twoBI = BigInteger.valueOf(2);
     for (String selector : selectors)
@@ -121,7 +121,7 @@ public class DecryptResponse
     }
     int elementsPerThread = (int) (Math.floor(selectors.size() / numThreads));
 
-    ArrayList<DecryptResponseRunnable> runnables = new ArrayList<DecryptResponseRunnable>();
+    ArrayList<DecryptResponseRunnable> runnables = new ArrayList<>();
     for (int i = 0; i < numThreads; ++i)
     {
       // Grab the range of the thread and create the corresponding partition of selectors
@@ -131,7 +131,7 @@ public class DecryptResponse
       {
         stop = selectors.size() - 1;
       }
-      TreeMap<Integer,String> selectorsPartition = new TreeMap<Integer,String>();
+      TreeMap<Integer,String> selectorsPartition = new TreeMap<>();
       for (int j = start; j <= stop; ++j)
       {
         selectorsPartition.put(j, selectors.get(j));
@@ -165,7 +165,7 @@ public class DecryptResponse
   // extract and reconstruct the data elements
   private ArrayList<BigInteger> decryptElements(TreeMap<Integer,BigInteger> elements, Paillier paillier)
   {
-    ArrayList<BigInteger> decryptedElements = new ArrayList<BigInteger>();
+    ArrayList<BigInteger> decryptedElements = new ArrayList<>();
 
     for (BigInteger encElement : elements.values())
     {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponseRunnable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponseRunnable.java b/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponseRunnable.java
index a70a6f6..35482c3 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponseRunnable.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/decrypt/DecryptResponseRunnable.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies.decrypt;
 
 import java.math.BigInteger;
@@ -23,13 +23,13 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.TreeMap;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.query.wideskies.QueryUtils;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.schema.response.QueryResponseJSON;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Runnable class for multithreaded PIR decryption
@@ -39,15 +39,15 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class DecryptResponseRunnable implements Runnable
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(DecryptResponseRunnable.class);
 
-  HashMap<String,ArrayList<QueryResponseJSON>> resultMap = null; // selector -> ArrayList of hits
+  private HashMap<String,ArrayList<QueryResponseJSON>> resultMap = null; // selector -> ArrayList of hits
 
-  ArrayList<BigInteger> rElements = null;
-  TreeMap<Integer,String> selectors = null;
-  HashMap<String,BigInteger> selectorMaskMap = null;
-  QueryInfo queryInfo = null;
-  HashMap<Integer,String> embedSelectorMap = null;
+  private ArrayList<BigInteger> rElements = null;
+  private TreeMap<Integer,String> selectors = null;
+  private HashMap<String,BigInteger> selectorMaskMap = null;
+  private QueryInfo queryInfo = null;
+  private HashMap<Integer,String> embedSelectorMap = null;
 
   public DecryptResponseRunnable(ArrayList<BigInteger> rElementsInput, TreeMap<Integer,String> selectorsInput, HashMap<String,BigInteger> selectorMaskMapInput,
       QueryInfo queryInfoInput, HashMap<Integer,String> embedSelectorMapInput)
@@ -58,7 +58,7 @@ public class DecryptResponseRunnable implements Runnable
     queryInfo = queryInfoInput;
     embedSelectorMap = embedSelectorMapInput;
 
-    resultMap = new HashMap<String,ArrayList<QueryResponseJSON>>();
+    resultMap = new HashMap<>();
   }
 
   public HashMap<String,ArrayList<QueryResponseJSON>> getResultMap()
@@ -96,7 +96,7 @@ public class DecryptResponseRunnable implements Runnable
         String selector = selectors.get(selectorIndex);
         logger.debug("selector = " + selector);
 
-        ArrayList<BigInteger> parts = new ArrayList<BigInteger>();
+        ArrayList<BigInteger> parts = new ArrayList<>();
         int partNum = 0;
         boolean zeroElement = true;
         while (partNum < numPartitionsPerDataElement)

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQuery.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQuery.java b/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQuery.java
index ca38fc5..87ee9d9 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQuery.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQuery.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies.encrypt;
 
 import java.io.File;
@@ -27,7 +27,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.querier.wideskies.Querier;
 import org.apache.pirk.querier.wideskies.QuerierConst;
@@ -39,8 +38,9 @@ import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.utils.KeyedHash;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to perform PIR encryption
@@ -48,22 +48,22 @@ import org.apache.pirk.utils.PIRException;
  */
 public class EncryptQuery
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(EncryptQuery.class);
 
-  QueryInfo queryInfo = null; // contains basic query information and functionality
+  private QueryInfo queryInfo = null; // contains basic query information and functionality
 
-  Query query = null; // contains the query vectors
+  private Query query = null; // contains the query vectors
 
-  Querier querier = null; // contains the query vectors and encryption object
+  private Querier querier = null; // contains the query vectors and encryption object
 
-  Paillier paillier = null; // Paillier encryption functionality
+  private Paillier paillier = null; // Paillier encryption functionality
 
-  ArrayList<String> selectors = null; // selectors for the query
+  private ArrayList<String> selectors = null; // selectors for the query
 
   // Map to check the embedded selectors in the results for false positives;
   // if the selector is a fixed size < 32 bits, it is included as is
   // if the selector is of variable lengths
-  HashMap<Integer,String> embedSelectorMap = null;
+  private HashMap<Integer,String> embedSelectorMap = null;
 
   public EncryptQuery(QueryInfo queryInfoInput, ArrayList<String> selectorsInput, Paillier paillierInput)
   {
@@ -73,7 +73,7 @@ public class EncryptQuery
 
     paillier = paillierInput;
 
-    embedSelectorMap = new HashMap<Integer,String>();
+    embedSelectorMap = new HashMap<>();
   }
 
   public Paillier getPaillier()
@@ -146,8 +146,8 @@ public class EncryptQuery
     String hashKey = queryInfo.getHashKey();
     int keyCounter = 0;
     int numSelectors = selectors.size();
-    HashSet<Integer> hashes = new HashSet<Integer>(numSelectors);
-    HashMap<Integer,Integer> selectorQueryVecMapping = new HashMap<Integer,Integer>(numSelectors);
+    HashSet<Integer> hashes = new HashSet<>(numSelectors);
+    HashMap<Integer,Integer> selectorQueryVecMapping = new HashMap<>(numSelectors);
 
     for (int index = 0; index < numSelectors; index++)
     {
@@ -202,7 +202,7 @@ public class EncryptQuery
   {
     // Encrypt and form the query vector
     ExecutorService es = Executors.newCachedThreadPool();
-    ArrayList<EncryptQueryRunnable> runnables = new ArrayList<EncryptQueryRunnable>(numThreads);
+    ArrayList<EncryptQueryRunnable> runnables = new ArrayList<>(numThreads);
     int numElements = 1 << queryInfo.getHashBitSize();  // 2^hashBitSize
 
     // Split the work across the requested number of threads
@@ -218,14 +218,14 @@ public class EncryptQuery
       }
 
       // Copy selectorQueryVecMapping (if numThreads > 1) so we don't have to synchronize - only has size = selectors.size()
-      HashMap<Integer,Integer> selectorQueryVecMappingCopy = null;
+      HashMap<Integer,Integer> selectorQueryVecMappingCopy;
       if (numThreads == 1)
       {
         selectorQueryVecMappingCopy = selectorQueryVecMapping;
       }
       else
       {
-        selectorQueryVecMappingCopy = new HashMap<Integer,Integer>(selectorQueryVecMapping);
+        selectorQueryVecMappingCopy = new HashMap<>(selectorQueryVecMapping);
       }
 
       // Create the runnable and execute

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQueryRunnable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQueryRunnable.java b/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQueryRunnable.java
index 04fb929..565560b 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQueryRunnable.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQueryRunnable.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,17 +15,17 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies.encrypt;
 
 import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.TreeMap;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.Paillier;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Runnable class for multithreaded PIR encryption
@@ -33,16 +33,16 @@ import org.apache.pirk.utils.PIRException;
  */
 public class EncryptQueryRunnable implements Runnable
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(EncryptQueryRunnable.class);
 
-  int dataPartitionBitSize = 0;
-  int start = 0; // start of computing range for the runnable
-  int stop = 0; // stop, inclusive, of the computing range for the runnable
+  private int dataPartitionBitSize = 0;
+  private int start = 0; // start of computing range for the runnable
+  private int stop = 0; // stop, inclusive, of the computing range for the runnable
 
-  Paillier paillier = null;
-  HashMap<Integer,Integer> selectorQueryVecMapping = null;
+  private Paillier paillier = null;
+  private HashMap<Integer,Integer> selectorQueryVecMapping = null;
 
-  TreeMap<Integer,BigInteger> encryptedValues = null; // holds the ordered encrypted values to pull after thread computation is complete
+  private TreeMap<Integer,BigInteger> encryptedValues = null; // holds the ordered encrypted values to pull after thread computation is complete
 
   public EncryptQueryRunnable(int dataPartitionBitSizeInput, Paillier paillierInput, HashMap<Integer,Integer> selectorQueryVecMappingInput, int startInput,
       int stopInput)

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/ExpTableRunnable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/ExpTableRunnable.java b/src/main/java/org/apache/pirk/querier/wideskies/encrypt/ExpTableRunnable.java
index a76000d..aaa0a81 100644
--- a/src/main/java/org/apache/pirk/querier/wideskies/encrypt/ExpTableRunnable.java
+++ b/src/main/java/org/apache/pirk/querier/wideskies/encrypt/ExpTableRunnable.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,16 +15,16 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.querier.wideskies.encrypt;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.ModPowAbstraction;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Runnable class for modular exponential table creation
@@ -32,16 +32,16 @@ import org.apache.pirk.utils.LogUtils;
  */
 public class ExpTableRunnable implements Runnable
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ExpTableRunnable.class);
 
-  int dataPartitionBitSize = 0;
-  BigInteger NSquared = null;
-  ArrayList<BigInteger> queryElements = null;
+  private int dataPartitionBitSize = 0;
+  private BigInteger NSquared = null;
+  private ArrayList<BigInteger> queryElements = null;
 
   // lookup table for exponentiation of query vectors -
   // based on dataPartitionBitSize
   // element -> <power, element^power mod N^2>
-  HashMap<BigInteger,HashMap<Integer,BigInteger>> expTable = null;
+  private HashMap<BigInteger,HashMap<Integer,BigInteger>> expTable = null;
 
   public ExpTableRunnable(int dataPartitionBitSizeInput, BigInteger NSquaredInput, ArrayList<BigInteger> queryElementsInput)
   {
@@ -49,7 +49,7 @@ public class ExpTableRunnable implements Runnable
     NSquared = NSquaredInput;
     queryElements = queryElementsInput;
 
-    expTable = new HashMap<BigInteger,HashMap<Integer,BigInteger>>();
+    expTable = new HashMap<>();
   }
 
   @Override
@@ -60,7 +60,7 @@ public class ExpTableRunnable implements Runnable
     {
       logger.debug("element = " + element.toString(2) + " maxValue = " + maxValue + " dataPartitionBitSize = " + dataPartitionBitSize);
 
-      HashMap<Integer,BigInteger> powMap = new HashMap<Integer,BigInteger>(); // <power, element^power mod N^2>
+      HashMap<Integer,BigInteger> powMap = new HashMap<>(); // <power, element^power mod N^2>
       for (int i = 0; i <= maxValue; ++i)
       {
         BigInteger value = ModPowAbstraction.modPow(element, BigInteger.valueOf(i), NSquared);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/query/wideskies/Query.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/query/wideskies/Query.java b/src/main/java/org/apache/pirk/query/wideskies/Query.java
index 8ef9f1c..ebaafbb 100644
--- a/src/main/java/org/apache/pirk/query/wideskies/Query.java
+++ b/src/main/java/org/apache/pirk/query/wideskies/Query.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,12 +15,11 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.query.wideskies;
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
@@ -36,10 +35,10 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.ModPowAbstraction;
 import org.apache.pirk.querier.wideskies.encrypt.ExpTableRunnable;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to hold the PIR query vectors
@@ -49,22 +48,22 @@ public class Query implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(Query.class);
 
-  QueryInfo qInfo = null; // holds all query info
+  private QueryInfo qInfo = null; // holds all query info
 
-  TreeMap<Integer,BigInteger> queryElements = null; // query elements - ordered on insertion
+  private TreeMap<Integer,BigInteger> queryElements = null; // query elements - ordered on insertion
 
   // lookup table for exponentiation of query vectors - based on dataPartitionBitSize
   // element -> <power, element^power mod N^2>
-  HashMap<BigInteger,HashMap<Integer,BigInteger>> expTable = null;
+  private HashMap<BigInteger,HashMap<Integer,BigInteger>> expTable = null;
 
   // File based lookup table for modular exponentiation
   // element hash -> filename containing it's <power, element^power mod N^2> modular exponentiations
-  HashMap<Integer,String> expFileBasedLookup = null;
+  private HashMap<Integer,String> expFileBasedLookup = null;
 
-  BigInteger N = null; // N=pq, RSA modulus for the Paillier encryption associated with the queryElements
-  BigInteger NSquared = null;
+  private BigInteger N = null; // N=pq, RSA modulus for the Paillier encryption associated with the queryElements
+  private BigInteger NSquared = null;
 
   public Query(QueryInfo queryInfoIn, BigInteger NInput)
   {
@@ -72,10 +71,10 @@ public class Query implements Serializable
     N = NInput;
     NSquared = N.pow(2);
 
-    queryElements = new TreeMap<Integer,BigInteger>();
-    expTable = new HashMap<BigInteger,HashMap<Integer,BigInteger>>();
+    queryElements = new TreeMap<>();
+    expTable = new HashMap<>();
 
-    expFileBasedLookup = new HashMap<Integer,String>();
+    expFileBasedLookup = new HashMap<>();
   }
 
   public QueryInfo getQueryInfo()
@@ -164,7 +163,7 @@ public class Query implements Serializable
       {
         logger.debug("element = " + element.toString(2) + " maxValue = " + maxValue + " dataPartitionBitSize = " + dataPartitionBitSize);
 
-        HashMap<Integer,BigInteger> powMap = new HashMap<Integer,BigInteger>(); // <power, element^power mod N^2>
+        HashMap<Integer,BigInteger> powMap = new HashMap<>(); // <power, element^power mod N^2>
         for (int i = 0; i <= maxValue; ++i)
         {
           BigInteger value = ModPowAbstraction.modPow(element, BigInteger.valueOf(i), NSquared);
@@ -180,7 +179,7 @@ public class Query implements Serializable
       ExecutorService es = Executors.newCachedThreadPool();
       int elementsPerThread = (int) (Math.floor(queryElements.size() / numThreads));
 
-      ArrayList<ExpTableRunnable> runnables = new ArrayList<ExpTableRunnable>();
+      ArrayList<ExpTableRunnable> runnables = new ArrayList<>();
       for (int i = 0; i < numThreads; ++i)
       {
         // Grab the range of the thread and create the corresponding partition of selectors
@@ -190,7 +189,7 @@ public class Query implements Serializable
         {
           stop = queryElements.size() - 1;
         }
-        ArrayList<BigInteger> queryElementsPartition = new ArrayList<BigInteger>();
+        ArrayList<BigInteger> queryElementsPartition = new ArrayList<>();
         for (int j = start; j <= stop; ++j)
         {
           queryElementsPartition.add(queryElements.get(j));
@@ -262,9 +261,8 @@ public class Query implements Serializable
    */
   public static Query readFromFile(String filename) throws IOException
   {
-    Query query = readFromFile(new File(filename));
 
-    return query;
+    return readFromFile(new File(filename));
   }
 
   /**
@@ -275,19 +273,13 @@ public class Query implements Serializable
     Query query = null;
 
     FileInputStream fIn = null;
-    ObjectInputStream oIn = null;
+    ObjectInputStream oIn;
     try
     {
       fIn = new FileInputStream(file);
       oIn = new ObjectInputStream(fIn);
       query = (Query) oIn.readObject();
-    } catch (FileNotFoundException e)
-    {
-      e.printStackTrace();
-    } catch (IOException e)
-    {
-      e.printStackTrace();
-    } catch (ClassNotFoundException e)
+    } catch (IOException | ClassNotFoundException e)
     {
       e.printStackTrace();
     } finally

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/query/wideskies/QueryInfo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/query/wideskies/QueryInfo.java b/src/main/java/org/apache/pirk/query/wideskies/QueryInfo.java
index f87f3d1..3ec73ea 100644
--- a/src/main/java/org/apache/pirk/query/wideskies/QueryInfo.java
+++ b/src/main/java/org/apache/pirk/query/wideskies/QueryInfo.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,14 +15,14 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.query.wideskies;
 
 import java.io.Serializable;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to hold all of the basic information regarding a query
@@ -35,30 +35,30 @@ public class QueryInfo implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(QueryInfo.class);
 
-  double queryNum = 0.0; // the identifier num of the query
-  int numSelectors = 0; // the number of selectors in the query, given by \floor{paillerBitSize/dataPartitionBitSize}
+  private double queryNum = 0.0; // the identifier num of the query
+  private int numSelectors = 0; // the number of selectors in the query, given by \floor{paillerBitSize/dataPartitionBitSize}
 
-  String queryType = null; // QueryType string const
+  private String queryType = null; // QueryType string const
 
-  String queryName = null; // Name of query
+  private String queryName = null; // Name of query
 
-  int paillierBitSize = 0; // Paillier modulus size
+  private int paillierBitSize = 0; // Paillier modulus size
 
-  int hashBitSize = 0; // Bit size of the keyed hash function
-  String hashKey = null; // Key for the keyed hash function
+  private int hashBitSize = 0; // Bit size of the keyed hash function
+  private String hashKey = null; // Key for the keyed hash function
 
-  int numBitsPerDataElement = 0; // total num bits per returned data value - defined relative to query type
-  int dataPartitionBitSize = 0; // num of bits for each partition of an incoming data element, must be < 32 right now
-  int numPartitionsPerDataElement = 0; // num partitions of size dataPartitionBitSize per data element
+  private int numBitsPerDataElement = 0; // total num bits per returned data value - defined relative to query type
+  private int dataPartitionBitSize = 0; // num of bits for each partition of an incoming data element, must be < 32 right now
+  private int numPartitionsPerDataElement = 0; // num partitions of size dataPartitionBitSize per data element
 
-  boolean useExpLookupTable = false; // whether or not to generate and use the expLookupTable for encryption, it is very expensive to compute
+  private boolean useExpLookupTable = false; // whether or not to generate and use the expLookupTable for encryption, it is very expensive to compute
 
-  boolean useHDFSExpLookupTable = false; // whether or not to use the expLookupTable stored in HDFS
+  private boolean useHDFSExpLookupTable = false; // whether or not to use the expLookupTable stored in HDFS
   // if it doesn't yet exist, it will be created within the cluster and stored in HDFS
 
-  boolean embedSelector = true; // whether or not to embed the selector in the results - results in a very low
+  private boolean embedSelector = true; // whether or not to embed the selector in the results - results in a very low
 
   // false positive rate for variable length selectors and a zero false positive rate
   // for selectors of fixed size < 32 bits
@@ -176,9 +176,7 @@ public class QueryInfo implements Serializable
 
   public QueryInfo copy()
   {
-    QueryInfo queryInfo = new QueryInfo(this.queryNum, this.numSelectors, this.hashBitSize, this.hashKey, this.dataPartitionBitSize, this.queryType,
+    return new QueryInfo(this.queryNum, this.numSelectors, this.hashBitSize, this.hashKey, this.dataPartitionBitSize, this.queryType,
         this.queryName, this.paillierBitSize, this.useExpLookupTable, this.embedSelector, this.useHDFSExpLookupTable);
-
-    return queryInfo;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/query/wideskies/QueryUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/query/wideskies/QueryUtils.java b/src/main/java/org/apache/pirk/query/wideskies/QueryUtils.java
index a0b09d2..0bf2fb7 100644
--- a/src/main/java/org/apache/pirk/query/wideskies/QueryUtils.java
+++ b/src/main/java/org/apache/pirk/query/wideskies/QueryUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,19 +15,19 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.query.wideskies;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.TreeSet;
 
 import org.apache.hadoop.io.ArrayWritable;
 import org.apache.hadoop.io.MapWritable;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.data.partitioner.DataPartitioner;
@@ -36,18 +36,19 @@ import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
 import org.apache.pirk.schema.response.QueryResponseJSON;
 import org.apache.pirk.utils.KeyedHash;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.StringUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.elasticsearch.hadoop.mr.WritableArrayWritable;
 import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class for helper methods to perform the encrypted query
  */
 public class QueryUtils
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(QueryUtils.class);
 
   /**
    * Method to convert the given BigInteger raw data element partitions to a QueryResponseJSON object based upon the given queryType
@@ -108,7 +109,7 @@ public class QueryUtils
    */
   public static ArrayList<BigInteger> partitionDataElement(String queryType, JSONObject jsonData, boolean embedSelector) throws Exception
   {
-    ArrayList<BigInteger> parts = new ArrayList<BigInteger>();
+    ArrayList<BigInteger> parts = new ArrayList<>();
 
     logger.debug("queryType = " + queryType);
 
@@ -142,7 +143,7 @@ public class QueryUtils
         List<String> elementArray;
         if (dataElement == null)
         {
-          elementArray = Arrays.asList("0");
+          elementArray = Collections.singletonList("0");
         }
         else
         {
@@ -174,7 +175,7 @@ public class QueryUtils
   public static ArrayList<BigInteger> partitionDataElement(MapWritable dataMap, QuerySchema qSchema, DataSchema dSchema, boolean embedSelector)
       throws Exception
   {
-    ArrayList<BigInteger> parts = new ArrayList<BigInteger>();
+    ArrayList<BigInteger> parts = new ArrayList<>();
 
     logger.debug("queryType = " + qSchema.getSchemaName());
 
@@ -205,7 +206,7 @@ public class QueryUtils
         List<String> elementArray = null;
         if (dataElement == null)
         {
-          elementArray = Arrays.asList("");
+          elementArray = Collections.singletonList("");
         }
         else if (dataElement instanceof WritableArrayWritable)
         {
@@ -241,7 +242,7 @@ public class QueryUtils
    */
   public static ArrayList<BigInteger> embeddedSelectorToPartitions(Object selector, String type, Object partitioner) throws Exception
   {
-    ArrayList<BigInteger> parts = null;
+    ArrayList<BigInteger> parts;
 
     int partitionBits = ((DataPartitioner) partitioner).getBits(type);
     if (partitionBits > 32) // hash and add 32-bit hash value to partitions
@@ -264,7 +265,7 @@ public class QueryUtils
    */
   public static String getEmbeddedSelector(Object selector, String type, Object partitioner) throws Exception
   {
-    String embeddedSelector = null;
+    String embeddedSelector;
 
     int partitionBits = ((DataPartitioner) partitioner).getBits(type);
     if (partitionBits > 32) // hash and add 32-bit hash value to partitions
@@ -285,7 +286,7 @@ public class QueryUtils
    */
   public static String getEmbeddedSelectorFromPartitions(ArrayList<BigInteger> parts, int partsIndex, String type, Object partitioner) throws Exception
   {
-    String embeddedSelector = null;
+    String embeddedSelector;
 
     int partitionBits = ((DataPartitioner) partitioner).getBits(type);
     if (partitionBits > 32) // the embedded selector will be the 32-bit hash value of the hit selector
@@ -308,7 +309,7 @@ public class QueryUtils
    */
   public static String getSelectorByQueryType(MapWritable dataMap, QuerySchema qSchema, DataSchema dSchema)
   {
-    String selector = null;
+    String selector;
 
     String fieldName = qSchema.getSelectorName();
     if (dSchema.hasListRep(fieldName))
@@ -339,7 +340,7 @@ public class QueryUtils
    */
   public static String getSelectorByQueryTypeJSON(String queryType, JSONObject dataMap)
   {
-    String selector = null;
+    String selector;
 
     QuerySchema qSchema = LoadQuerySchemas.getSchema(queryType);
     DataSchema dSchema = LoadDataSchemas.getSchema(qSchema.getDataSchemaName());

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/ResponderCLI.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/ResponderCLI.java b/src/main/java/org/apache/pirk/responder/wideskies/ResponderCLI.java
index 5285a88..e412625 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/ResponderCLI.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/ResponderCLI.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies;
 
 import org.apache.commons.cli.CommandLine;
@@ -24,22 +24,22 @@ import org.apache.commons.cli.GnuParser;
 import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.apache.log4j.Logger;
 import org.apache.pirk.inputformat.hadoop.InputFormatConst;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class for parsing the command line options for the ResponderDriver
  */
 public class ResponderCLI
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ResponderCLI.class);
 
-  Options cliOptions = null;
-  CommandLine commandLine = null;
+  private Options cliOptions = null;
+  private CommandLine commandLine = null;
 
   // Required args
   public static String PLATFORM = "platform";
@@ -54,19 +54,19 @@ public class ResponderCLI
   // Optional args
   public static String BASEINPUTFORMAT = "baseInputFormat";
   public static String STOPLISTFILE = "stopListFile";
-  public static String NUMREDUCETASKS = "numReduceTasks";
+  private static String NUMREDUCETASKS = "numReduceTasks";
   public static String USELOCALCACHE = "useLocalCache";
   public static String LIMITHITSPERSELECTOR = "limitHitsPerSelector";
   public static String MAXHITSPERSELECTOR = "maxHitsPerSelector";
-  public static String MAPMEMORY = "mapreduceMapMemoryMb";
-  public static String REDUCEMEMORY = "mapreduceReduceMemoryMb";
-  public static String MAPJAVAOPTS = "mapreduceMapJavaOpts";
-  public static String REDUCEJAVAOPTS = "mapreduceReduceJavaOpts";
+  private static String MAPMEMORY = "mapreduceMapMemoryMb";
+  private static String REDUCEMEMORY = "mapreduceReduceMemoryMb";
+  private static String MAPJAVAOPTS = "mapreduceMapJavaOpts";
+  private static String REDUCEJAVAOPTS = "mapreduceReduceJavaOpts";
   public static String QUERYSCHEMAS = "querySchemas";
   public static String DATASCHEMAS = "dataSchemas";
   public static String NUMEXPLOOKUPPARTS = "numExpLookupPartitions";
-  public static String USEHDFSLOOKUPTABLE = "useHDFSLookupTable";
-  public static String NUMDATAPARTITIONS = "numDataPartitions";
+  private static String USEHDFSLOOKUPTABLE = "useHDFSLookupTable";
+  private static String NUMDATAPARTITIONS = "numDataPartitions";
   public static String NUMCOLMULTPARTITIONS = "numColMultPartitions";
   public static String USEMODEXPJOIN = "useModExpJoin";
   public static String COLMULTREDUCEBYKEY = "colMultReduceByKey";

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/ResponderDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/ResponderDriver.java b/src/main/java/org/apache/pirk/responder/wideskies/ResponderDriver.java
index d119adb..4cd6b5f 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/ResponderDriver.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/ResponderDriver.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies;
 
 import org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/responder/wideskies/common/ComputeEncryptedRow.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/responder/wideskies/common/ComputeEncryptedRow.java b/src/main/java/org/apache/pirk/responder/wideskies/common/ComputeEncryptedRow.java
index e4dcbed..0a0d7ef 100644
--- a/src/main/java/org/apache/pirk/responder/wideskies/common/ComputeEncryptedRow.java
+++ b/src/main/java/org/apache/pirk/responder/wideskies/common/ComputeEncryptedRow.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.responder.wideskies.common;
 
 import java.io.BufferedReader;
@@ -26,33 +26,32 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.concurrent.ExecutionException;
 
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.ModPowAbstraction;
 import org.apache.pirk.inputformat.hadoop.BytesArrayWritable;
 import org.apache.pirk.query.wideskies.Query;
-import org.apache.pirk.utils.LogUtils;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.Tuple2;
 import scala.Tuple3;
 
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-
 /**
  * Class to compute the encrypted row elements for a query from extracted data partitions
  * 
  */
 public class ComputeEncryptedRow
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ComputeEncryptedRow.class);
 
   // Input: base, exponent, NSquared
   // <<base,exponent,NSquared>, base^exponent mod N^2>
-  static LoadingCache<Tuple3<BigInteger,BigInteger,BigInteger>,BigInteger> expCache = CacheBuilder.newBuilder().maximumSize(10000)
-      .build(new CacheLoader<Tuple3<BigInteger,BigInteger,BigInteger>,BigInteger>()
+  private static LoadingCache<Tuple3<BigInteger,BigInteger,BigInteger>,BigInteger> expCache =
+      CacheBuilder.newBuilder().maximumSize(10000)
+          .build(new CacheLoader<Tuple3<BigInteger,BigInteger,BigInteger>,BigInteger>()
       {
         @Override
         public BigInteger load(Tuple3<BigInteger,BigInteger,BigInteger> info) throws Exception
@@ -83,13 +82,13 @@ public class ComputeEncryptedRow
       BigInteger value = new BigInteger(expMod[1]);
 
       // Cache: <<base,exponent,NSquared>, base^exponent mod N^2>
-      Tuple3<BigInteger,BigInteger,BigInteger> key = new Tuple3<BigInteger,BigInteger,BigInteger>(base, exponent, query.getNSquared());
+      Tuple3<BigInteger,BigInteger,BigInteger> key = new Tuple3<>(base, exponent, query.getNSquared());
       expCache.put(key, value);
     }
   }
 
   /**
-   * Method to compute the encrypted row elements for a query from extracted data partitions in the form of Iterable{@code<BytesArrayWritable>}
+   * Method to compute the encrypted row elements for a query from extracted data partitions in the form of Iterable{@link <BytesArrayWritable>}
    * <p>
    * For each row (as indicated by key = hash(selector)), iterates over the dataPartitions and calculates the column values.
    * <p>
@@ -101,7 +100,7 @@ public class ComputeEncryptedRow
   public static ArrayList<Tuple2<Long,BigInteger>> computeEncRow(Iterable<BytesArrayWritable> dataPartitionsIter, Query query, int rowIndex,
       boolean limitHitsPerSelector, int maxHitsPerSelector, boolean useCache) throws IOException
   {
-    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<Tuple2<Long,BigInteger>>();
+    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<>();
 
     // Pull the corresponding encrypted row query
     BigInteger rowQuery = query.getQueryElement(rowIndex);
@@ -130,7 +129,7 @@ public class ComputeEncryptedRow
         {
           if (useCache)
           {
-            exp = expCache.get(new Tuple3<BigInteger,BigInteger,BigInteger>(rowQuery, part, query.getNSquared()));
+            exp = expCache.get(new Tuple3<>(rowQuery, part, query.getNSquared()));
           }
           else
           {
@@ -143,7 +142,7 @@ public class ComputeEncryptedRow
         logger.debug("rowIndex = " + rowIndex + " colCounter = " + colCounter + " part = " + part.toString() + " part binary = " + part.toString(2) + " exp = "
             + exp + " i = " + i + " partition = " + dataPartitions.getBigInteger(i) + " = " + dataPartitions.getBigInteger(i).toString(2));
 
-        returnPairs.add(new Tuple2<Long,BigInteger>(colCounter, exp));
+        returnPairs.add(new Tuple2<>(colCounter, exp));
 
         ++colCounter;
       }
@@ -153,7 +152,7 @@ public class ComputeEncryptedRow
   }
 
   /**
-   * Method to compute the encrypted row elements for a query from extracted data partitions in the form of Iterable{@ArrayList<BigInteger>
+   * Method to compute the encrypted row elements for a query from extracted data partitions in the form of Iterable{@link ArrayList<BigInteger>
    * 
    * 
    * }
@@ -168,7 +167,7 @@ public class ComputeEncryptedRow
   public static ArrayList<Tuple2<Long,BigInteger>> computeEncRowBI(Iterable<ArrayList<BigInteger>> dataPartitionsIter, Query query, int rowIndex,
       boolean limitHitsPerSelector, int maxHitsPerSelector, boolean useCache) throws IOException
   {
-    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<Tuple2<Long,BigInteger>>();
+    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<>();
 
     // Pull the corresponding encrypted row query
     BigInteger rowQuery = query.getQueryElement(rowIndex);
@@ -200,7 +199,7 @@ public class ComputeEncryptedRow
         {
           if (useCache)
           {
-            exp = expCache.get(new Tuple3<BigInteger,BigInteger,BigInteger>(rowQuery, part, query.getNSquared()));
+            exp = expCache.get(new Tuple3<>(rowQuery, part, query.getNSquared()));
           }
           else
           {
@@ -213,7 +212,7 @@ public class ComputeEncryptedRow
         logger.debug("rowIndex = " + rowIndex + " colCounter = " + colCounter + " part = " + part.toString() + " part binary = " + part.toString(2) + " exp = "
             + exp + " i = " + i);
 
-        returnPairs.add(new Tuple2<Long,BigInteger>(colCounter, exp));
+        returnPairs.add(new Tuple2<>(colCounter, exp));
 
         ++colCounter;
       }
@@ -229,7 +228,7 @@ public class ComputeEncryptedRow
   }
 
   /**
-   * Method to compute the encrypted row elements for a query from extracted data partitions in the form of Iterable{@<BytesArrayWritable>
+   * Method to compute the encrypted row elements for a query from extracted data partitions in the form of Iterable{@link <BytesArrayWritable>
    * 
    * 
    * } given an input modular exponentiation table for the row
@@ -242,7 +241,7 @@ public class ComputeEncryptedRow
   public static ArrayList<Tuple2<Long,BigInteger>> computeEncRowCacheInput(Iterable<ArrayList<BigInteger>> dataPartitionsIter,
       HashMap<Integer,BigInteger> cache, int rowIndex, boolean limitHitsPerSelector, int maxHitsPerSelector) throws IOException
   {
-    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<Tuple2<Long,BigInteger>>();
+    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<>();
 
     long colCounter = 0;
     int elementCounter = 0;
@@ -267,7 +266,7 @@ public class ComputeEncryptedRow
 
         logger.debug("rowIndex = " + rowIndex + " colCounter = " + colCounter + " part = " + part.toString() + " exp = " + exp + " i = " + i);
 
-        returnPairs.add(new Tuple2<Long,BigInteger>(colCounter, exp));
+        returnPairs.add(new Tuple2<>(colCounter, exp));
 
         ++colCounter;
       }
@@ -290,7 +289,7 @@ public class ComputeEncryptedRow
    */
   public static ArrayList<Tuple2<Long,BigInteger>> computeEncRow(BytesArrayWritable dataPartitions, Query query, int rowIndex, int colIndex) throws IOException
   {
-    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<Tuple2<Long,BigInteger>>();
+    ArrayList<Tuple2<Long,BigInteger>> returnPairs = new ArrayList<>();
 
     // Pull the corresponding encrypted row query
     BigInteger rowQuery = query.getQueryElement(rowIndex);
@@ -308,7 +307,7 @@ public class ComputeEncryptedRow
       BigInteger exp = null;
       try
       {
-        exp = expCache.get(new Tuple3<BigInteger,BigInteger,BigInteger>(rowQuery, part, query.getNSquared()));
+        exp = expCache.get(new Tuple3<>(rowQuery, part, query.getNSquared()));
       } catch (ExecutionException e)
       {
         e.printStackTrace();
@@ -317,7 +316,7 @@ public class ComputeEncryptedRow
       logger.debug("rowIndex = " + rowIndex + " colCounter = " + colCounter + " part = " + part.toString() + " part binary = " + part.toString(2) + " exp = "
           + exp + " i = " + i + " partition = " + dataPartitions.getBigInteger(i) + " = " + dataPartitions.getBigInteger(i).toString(2));
 
-      returnPairs.add(new Tuple2<Long,BigInteger>(colCounter, exp));
+      returnPairs.add(new Tuple2<>(colCounter, exp));
 
       ++colCounter;
     }



[2/4] incubator-pirk git commit: PIRK-11 Switch to SLF4J with Log4j2 bindings, including other minor cleanup - closes apache/incubator-pirk#20

Posted by ea...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/data/partitioner/DataPartitioner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/data/partitioner/DataPartitioner.java b/src/main/java/org/apache/pirk/schema/data/partitioner/DataPartitioner.java
index 1bbecca..cd1e632 100644
--- a/src/main/java/org/apache/pirk/schema/data/partitioner/DataPartitioner.java
+++ b/src/main/java/org/apache/pirk/schema/data/partitioner/DataPartitioner.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.data.partitioner;
 
 import java.io.Serializable;
@@ -35,32 +35,32 @@ public interface DataPartitioner extends Serializable
    * <p>
    * If the Object does not have/need a specific type identifier, use null
    */
-  public ArrayList<BigInteger> toPartitions(Object object, String type) throws Exception;
+  ArrayList<BigInteger> toPartitions(Object object, String type) throws Exception;
 
   /**
    * Method to reconstruct an Object given an ArrayList of its BigInteger partition elements and its type identifier
    * <p>
    * If the Object does not have/need a specific type identifier, use null
    */
-  public Object fromPartitions(ArrayList<BigInteger> parts, int partsIndex, String type) throws Exception;
+  Object fromPartitions(ArrayList<BigInteger> parts, int partsIndex, String type) throws Exception;
 
   /**
    * Method to return the number of bits of an object with the given type
    */
-  public int getBits(String type) throws Exception;
+  int getBits(String type) throws Exception;
 
   /**
    * Create partitions for an array of the same type of elements - used when a data value field is an array and we wish to encode these into the return value
    */
-  public ArrayList<BigInteger> arrayToPartitions(List<?> elementList, String type) throws Exception;
+  ArrayList<BigInteger> arrayToPartitions(List<?> elementList, String type) throws Exception;
 
   /**
    * Method to get an empty set of partitions by data type - used for padding return array values
    */
-  public ArrayList<BigInteger> getPaddedPartitions(String type) throws Exception;
+  ArrayList<BigInteger> getPaddedPartitions(String type) throws Exception;
 
   /**
    * Method to get the number of partitions of the data object given the type
    */
-  public int getNumPartitions(String type) throws Exception;
+  int getNumPartitions(String type) throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/data/partitioner/IPDataPartitioner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/data/partitioner/IPDataPartitioner.java b/src/main/java/org/apache/pirk/schema/data/partitioner/IPDataPartitioner.java
index 25e49a4..494aba0 100644
--- a/src/main/java/org/apache/pirk/schema/data/partitioner/IPDataPartitioner.java
+++ b/src/main/java/org/apache/pirk/schema/data/partitioner/IPDataPartitioner.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.data.partitioner;
 
 import java.math.BigInteger;
@@ -36,7 +36,7 @@ public class IPDataPartitioner implements DataPartitioner
   @Override
   public ArrayList<BigInteger> toPartitions(Object object, String type) throws Exception
   {
-    ArrayList<BigInteger> parts = new ArrayList<BigInteger>();
+    ArrayList<BigInteger> parts = new ArrayList<>();
 
     String[] octets = ((String) object).split("\\.");
     for (String oct : octets)
@@ -50,7 +50,7 @@ public class IPDataPartitioner implements DataPartitioner
   @Override
   public Object fromPartitions(ArrayList<BigInteger> parts, int partsIndex, String type) throws Exception
   {
-    Object element = null;
+    Object element;
 
     element = parts.get(partsIndex).toString() + "." + parts.get(partsIndex + 1).toString() + "." + parts.get(partsIndex + 2).toString() + "."
         + parts.get(partsIndex + 3).toString();
@@ -67,7 +67,7 @@ public class IPDataPartitioner implements DataPartitioner
   @Override
   public ArrayList<BigInteger> getPaddedPartitions(String type) throws Exception
   {
-    ArrayList<BigInteger> parts = new ArrayList<BigInteger>();
+    ArrayList<BigInteger> parts = new ArrayList<>();
 
     for (int i = 0; i < 4; ++i)
     {
@@ -82,7 +82,7 @@ public class IPDataPartitioner implements DataPartitioner
   @Override
   public ArrayList<BigInteger> arrayToPartitions(List<?> elementList, String type) throws Exception
   {
-    ArrayList<BigInteger> parts = new ArrayList<BigInteger>();
+    ArrayList<BigInteger> parts = new ArrayList<>();
 
     int numArrayElementsToReturn = Integer.parseInt(SystemConfiguration.getProperty("pir.numReturnArrayElements", "1"));
     for (int i = 0; i < numArrayElementsToReturn; ++i)

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/data/partitioner/ISO8601DatePartitioner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/data/partitioner/ISO8601DatePartitioner.java b/src/main/java/org/apache/pirk/schema/data/partitioner/ISO8601DatePartitioner.java
index 4bd29b6..715bf15 100644
--- a/src/main/java/org/apache/pirk/schema/data/partitioner/ISO8601DatePartitioner.java
+++ b/src/main/java/org/apache/pirk/schema/data/partitioner/ISO8601DatePartitioner.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.data.partitioner;
 
 import java.math.BigInteger;
@@ -33,7 +33,7 @@ public class ISO8601DatePartitioner implements DataPartitioner
 {
   private static final long serialVersionUID = 1L;
 
-  PrimitiveTypePartitioner ptp = null;
+  private PrimitiveTypePartitioner ptp = null;
 
   public ISO8601DatePartitioner()
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/data/partitioner/PrimitiveTypePartitioner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/data/partitioner/PrimitiveTypePartitioner.java b/src/main/java/org/apache/pirk/schema/data/partitioner/PrimitiveTypePartitioner.java
index 1c3f42d..3688e81 100644
--- a/src/main/java/org/apache/pirk/schema/data/partitioner/PrimitiveTypePartitioner.java
+++ b/src/main/java/org/apache/pirk/schema/data/partitioner/PrimitiveTypePartitioner.java
@@ -18,16 +18,16 @@
  */
 package org.apache.pirk.schema.data.partitioner;
 
-import org.apache.http.util.ByteArrayBuffer;
-import org.apache.log4j.Logger;
-import org.apache.pirk.utils.LogUtils;
-import org.apache.pirk.utils.SystemConfiguration;
-
 import java.math.BigInteger;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.http.util.ByteArrayBuffer;
+import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * Class for partitioning objects with primitive Java types
  * 
@@ -36,7 +36,7 @@ public class PrimitiveTypePartitioner implements DataPartitioner
 {
   private static final long serialVersionUID = 1L;
 
-  private Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(PrimitiveTypePartitioner.class);
 
   public static final String BYTE = "byte";
   public static final String SHORT = "short";

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/query/LoadQuerySchemas.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/query/LoadQuerySchemas.java b/src/main/java/org/apache/pirk/schema/query/LoadQuerySchemas.java
index 213e983..fa00756 100644
--- a/src/main/java/org/apache/pirk/schema/query/LoadQuerySchemas.java
+++ b/src/main/java/org/apache/pirk/schema/query/LoadQuerySchemas.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.query;
 
 import java.io.File;
@@ -29,12 +29,12 @@ import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.data.partitioner.DataPartitioner;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -66,15 +66,15 @@ import org.w3c.dom.NodeList;
  */
 public class LoadQuerySchemas
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(LoadQuerySchemas.class);
 
-  public static HashMap<String,QuerySchema> schemaMap;
+  private static HashMap<String,QuerySchema> schemaMap;
 
   static
   {
     logger.info("Loading query schemas: ");
 
-    schemaMap = new HashMap<String,QuerySchema>();
+    schemaMap = new HashMap<>();
     try
     {
       initialize();
@@ -124,13 +124,13 @@ public class LoadQuerySchemas
 
   private static QuerySchema loadQuerySchemaFile(String schemaFile, boolean hdfs, FileSystem fs) throws Exception
   {
-    QuerySchema querySchema = null;
+    QuerySchema querySchema;
 
     DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
     DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
 
     // Read in and parse the schema file
-    Document doc = null;
+    Document doc;
     if (hdfs)
     {
       Path filePath = new Path(schemaFile);
@@ -176,7 +176,7 @@ public class LoadQuerySchemas
     }
     Element elements = (Element) elementsList.item(0);
 
-    TreeSet<String> elementNames = new TreeSet<String>();
+    TreeSet<String> elementNames = new TreeSet<>();
     int dataElementSize = 0;
     NodeList nList = elements.getElementsByTagName("name");
     for (int i = 0; i < nList.getLength(); i++)
@@ -193,7 +193,7 @@ public class LoadQuerySchemas
         // Compute the number of bits for this element
         logger.info("name = " + name);
         logger.info("partitionerName = " + dataSchema.getPartitionerName(name));
-        if (((DataPartitioner) dataSchema.getPartitionerForElement(name)) == null)
+        if ((dataSchema.getPartitionerForElement(name)) == null)
         {
           logger.info("partitioner is null");
         }
@@ -218,7 +218,7 @@ public class LoadQuerySchemas
     }
 
     // Extract the filterNames, if they exist
-    HashSet<String> filterNamesSet = new HashSet<String>();
+    HashSet<String> filterNamesSet = new HashSet<>();
     if (doc.getElementsByTagName("filterNames").item(0) != null)
     {
       NodeList filterNamesList = doc.getElementsByTagName("filterNames");
@@ -256,7 +256,7 @@ public class LoadQuerySchemas
    */
   private static String extractValue(Document doc, String valueName) throws Exception
   {
-    String value = null;
+    String value;
 
     NodeList itemList = doc.getElementsByTagName(valueName);
     if (itemList.getLength() > 1)

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/query/QuerySchema.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/query/QuerySchema.java b/src/main/java/org/apache/pirk/schema/query/QuerySchema.java
index b3ea515..7610b52 100644
--- a/src/main/java/org/apache/pirk/schema/query/QuerySchema.java
+++ b/src/main/java/org/apache/pirk/schema/query/QuerySchema.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.query;
 
 import java.io.Serializable;
@@ -35,24 +35,24 @@ public class QuerySchema implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  public static final String NO_FILTER = "noFilter";
+  static final String NO_FILTER = "noFilter";
 
-  String schemaName = null;
+  private String schemaName = null;
 
-  String dataSchemaName = null; // name of the DataSchema for this query schema
+  private String dataSchemaName = null; // name of the DataSchema for this query schema
 
-  TreeSet<String> elementNames = null; // names of elements in the data schema to
+  private TreeSet<String> elementNames = null; // names of elements in the data schema to
                                        // include in the response, order matters for packing/unpacking
 
-  String filter = null; // name of filter class to use in data filtering
+  private String filter = null; // name of filter class to use in data filtering
 
-  Object filterObj = null; // instance of the filter
+  private Object filterObj = null; // instance of the filter
 
-  HashSet<String> filterElementNames = null; // set of element names to apply filtering in pre-processing
+  private HashSet<String> filterElementNames = null; // set of element names to apply filtering in pre-processing
 
-  String selectorName = null; // name of element in the dataSchema to be used as the selector
+  private String selectorName = null; // name of element in the dataSchema to be used as the selector
 
-  int dataElementSize = 0; // total number of bits to be returned for each data element hit
+  private int dataElementSize = 0; // total number of bits to be returned for each data element hit
 
   public QuerySchema(String schemaNameInput, String dataSchemaNameInput, TreeSet<String> elementNamesInput, String selectorNameInput, int dataElementSizeInput,
       HashSet<String> filterElementNamesInput, String filterIn) throws Exception

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/query/filter/DataFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/query/filter/DataFilter.java b/src/main/java/org/apache/pirk/schema/query/filter/DataFilter.java
index 17f387d..35c64e0 100644
--- a/src/main/java/org/apache/pirk/schema/query/filter/DataFilter.java
+++ b/src/main/java/org/apache/pirk/schema/query/filter/DataFilter.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.query.filter;
 
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/query/filter/FilterFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/query/filter/FilterFactory.java b/src/main/java/org/apache/pirk/schema/query/filter/FilterFactory.java
index 8c86235..946f803 100644
--- a/src/main/java/org/apache/pirk/schema/query/filter/FilterFactory.java
+++ b/src/main/java/org/apache/pirk/schema/query/filter/FilterFactory.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.query.filter;
 
 import java.io.BufferedReader;
@@ -44,12 +44,12 @@ public class FilterFactory
       FileSystem fs = FileSystem.get(new Configuration());
 
       // Grab the stopList
-      HashSet<String> stopList = new HashSet<String>();
+      HashSet<String> stopList = new HashSet<>();
       String stopListFile = SystemConfiguration.getProperty("pir.stopListFile", "none");
 
       if (!stopListFile.equals("none"))
       {
-        BufferedReader br = null;
+        BufferedReader br;
         if (fs.exists(new Path(stopListFile)))
         {
           br = new BufferedReader(new InputStreamReader(fs.open(new Path(stopListFile))));
@@ -60,7 +60,7 @@ public class FilterFactory
           br = new BufferedReader(fr);
         }
 
-        String qLine = null;
+        String qLine;
         while ((qLine = br.readLine()) != null)
         {
           stopList.add(qLine);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/query/filter/StopListFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/query/filter/StopListFilter.java b/src/main/java/org/apache/pirk/schema/query/filter/StopListFilter.java
index 1f458c1..6c58d2c 100644
--- a/src/main/java/org/apache/pirk/schema/query/filter/StopListFilter.java
+++ b/src/main/java/org/apache/pirk/schema/query/filter/StopListFilter.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.query.filter;
 
 import java.util.Arrays;
@@ -24,11 +24,11 @@ import java.util.List;
 
 import org.apache.hadoop.io.ArrayWritable;
 import org.apache.hadoop.io.MapWritable;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.StopListUtils;
 import org.elasticsearch.hadoop.mr.WritableArrayWritable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Filter class to filter data elements based upon a stoplist applied to specified field elements
@@ -37,10 +37,10 @@ public class StopListFilter implements DataFilter
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(StopListFilter.class);
 
-  HashSet<String> filterSet = null;
-  HashSet<String> stopList = null;
+  private HashSet<String> filterSet = null;
+  private HashSet<String> stopList = null;
 
   public StopListFilter(HashSet<String> filterSetIn, HashSet<String> stopListIn)
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/schema/response/QueryResponseJSON.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/schema/response/QueryResponseJSON.java b/src/main/java/org/apache/pirk/schema/response/QueryResponseJSON.java
index 5b3c108..5f7e79c 100644
--- a/src/main/java/org/apache/pirk/schema/response/QueryResponseJSON.java
+++ b/src/main/java/org/apache/pirk/schema/response/QueryResponseJSON.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.schema.response;
 
 import java.io.Serializable;
@@ -25,15 +25,15 @@ import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.QueryInfo;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.QuerySchema;
-import org.apache.pirk.utils.LogUtils;
 import org.json.simple.JSONObject;
 import org.json.simple.JSONValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * JSON helper class for query results
@@ -44,13 +44,13 @@ public class QueryResponseJSON implements Serializable
 {
   private static final long serialVersionUID = 1L;
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(QueryResponseJSON.class);
 
-  JSONObject jsonObj = null;
+  private JSONObject jsonObj = null;
 
-  DataSchema dSchema = null;
+  private DataSchema dSchema = null;
 
-  QueryInfo queryInfo = null;
+  private QueryInfo queryInfo = null;
 
   public static final String EVENT_TYPE = "event_type"; // notification type the matched the record
   public static final Text EVENT_TYPE_TEXT = new Text(EVENT_TYPE);
@@ -131,7 +131,7 @@ public class QueryResponseJSON implements Serializable
     HashSet<String> schemaListRep = dSchema.getListRep();
     for (String key : schemaListRep)
     {
-      jsonObj.put(key, new ArrayList<Object>());
+      jsonObj.put(key, new ArrayList<>());
     }
   }
 
@@ -152,10 +152,10 @@ public class QueryResponseJSON implements Serializable
       {
         if (!(val instanceof ArrayList))
         {
-          ArrayList<Object> list = null;
+          ArrayList<Object> list;
           if (!jsonObj.containsKey(key))
           {
-            list = new ArrayList<Object>();
+            list = new ArrayList<>();
             jsonObj.put(key, list);
           }
           list = (ArrayList<Object>) jsonObj.get(key);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/test/distributed/DistributedTestCLI.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/test/distributed/DistributedTestCLI.java b/src/main/java/org/apache/pirk/test/distributed/DistributedTestCLI.java
index 977fa5e..1535e1f 100644
--- a/src/main/java/org/apache/pirk/test/distributed/DistributedTestCLI.java
+++ b/src/main/java/org/apache/pirk/test/distributed/DistributedTestCLI.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.test.distributed;
 
 import org.apache.commons.cli.CommandLine;
@@ -24,18 +24,18 @@ import org.apache.commons.cli.GnuParser;
 import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.apache.log4j.Logger;
-import org.apache.pirk.utils.LogUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A container for Apache's Command Line Interface that contains custom functionality for the MapReduce functional tests.
  */
 public class DistributedTestCLI
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(DistributedTestCLI.class);
 
-  CommandLine commandLine = null;
-  Options cliOptions = null;
+  private CommandLine commandLine = null;
+  private Options cliOptions = null;
 
   /**
    * Create and parse allowable options

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/test/distributed/DistributedTestDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/test/distributed/DistributedTestDriver.java b/src/main/java/org/apache/pirk/test/distributed/DistributedTestDriver.java
index f567bab..d822e81 100755
--- a/src/main/java/org/apache/pirk/test/distributed/DistributedTestDriver.java
+++ b/src/main/java/org/apache/pirk/test/distributed/DistributedTestDriver.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,22 +15,22 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.test.distributed;
 
 import java.util.ArrayList;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.schema.query.filter.StopListFilter;
 import org.apache.pirk.test.distributed.testsuite.DistTestSuite;
 import org.apache.pirk.test.utils.Inputs;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Driver class to run the suite of functional tests for MR and Spark PIR
@@ -38,7 +38,7 @@ import org.json.simple.JSONObject;
  */
 public class DistributedTestDriver
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(DistributedTestDriver.class);
 
   // Input
   public static final String JSON_PIR_INPUT_FILE_PROPERTY = "test.pir.inputJSONFile";

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/test/distributed/testsuite/DistTestSuite.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/test/distributed/testsuite/DistTestSuite.java b/src/main/java/org/apache/pirk/test/distributed/testsuite/DistTestSuite.java
index dec00f9..37cb43c 100644
--- a/src/main/java/org/apache/pirk/test/distributed/testsuite/DistTestSuite.java
+++ b/src/main/java/org/apache/pirk/test/distributed/testsuite/DistTestSuite.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.test.distributed.testsuite;
 
 import java.io.File;
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.inputformat.hadoop.InputFormatConst;
 import org.apache.pirk.inputformat.hadoop.json.JSONInputFormatBase;
@@ -41,10 +40,11 @@ import org.apache.pirk.test.distributed.DistributedTestDriver;
 import org.apache.pirk.test.utils.BaseTests;
 import org.apache.pirk.test.utils.Inputs;
 import org.apache.pirk.test.utils.TestUtils;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.apache.spark.launcher.SparkLauncher;
 import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Distributed test class for PIR
@@ -52,7 +52,7 @@ import org.json.simple.JSONObject;
  */
 public class DistTestSuite
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(DistTestSuite.class);
 
   // This method also tests all non-query specific configuration options/properties
   // for the MapReduce version of PIR
@@ -299,7 +299,7 @@ public class DistTestSuite
     SystemConfiguration.setProperty("pir.numReduceTasks", "1");
     SystemConfiguration.setProperty("pir.stopListFile", SystemConfiguration.getProperty(DistributedTestDriver.PIR_STOPLIST_FILE));
 
-    ArrayList<QueryResponseJSON> results = null;
+    ArrayList<QueryResponseJSON> results;
 
     // Create the temp result file
     File fileFinalResults = File.createTempFile("finalResultsFile", ".txt");
@@ -361,7 +361,7 @@ public class DistTestSuite
       // Build args
       String inputFormat = SystemConfiguration.getProperty("pir.dataInputFormat");
       logger.info("inputFormat = " + inputFormat);
-      ArrayList<String> args = new ArrayList<String>();
+      ArrayList<String> args = new ArrayList<>();
       args.add("-" + ResponderCLI.PLATFORM + "=spark");
       args.add("-" + ResponderCLI.DATAINPUTFORMAT + "=" + inputFormat);
       args.add("-" + ResponderCLI.QUERYINPUT + "=" + SystemConfiguration.getProperty("pir.queryInput"));

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/test/utils/BaseTests.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/test/utils/BaseTests.java b/src/main/java/org/apache/pirk/test/utils/BaseTests.java
index 621b64e..51497d6 100644
--- a/src/main/java/org/apache/pirk/test/utils/BaseTests.java
+++ b/src/main/java/org/apache/pirk/test/utils/BaseTests.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,41 +15,40 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.test.utils;
 
-import static org.junit.Assert.fail;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
 import org.apache.pirk.query.wideskies.QueryUtils;
 import org.apache.pirk.schema.response.QueryResponseJSON;
 import org.apache.pirk.test.distributed.testsuite.DistTestSuite;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.StringUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.fail;
 
 /**
  * Class to hold the base functional distributed tests
  */
 public class BaseTests
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(BaseTests.class);
 
   public static double queryNum = 1.0;
   public static int dataPartitionBitSize = 8;
 
   // Selectors for domain and IP queries, queryNum is the first entry for file generation
-  public static ArrayList<String> selectorsDomain = new ArrayList<String>(Arrays.asList("s.t.u.net", "d.e.com", "r.r.r.r", "a.b.c.com", "something.else",
+  private static ArrayList<String> selectorsDomain = new ArrayList<>(Arrays.asList("s.t.u.net", "d.e.com", "r.r.r.r", "a.b.c.com", "something.else",
       "x.y.net"));
-  public static ArrayList<String> selectorsIP = new ArrayList<String>(Arrays.asList("55.55.55.55", "5.6.7.8", "10.20.30.40", "13.14.15.16", "21.22.23.24"));
+  private static ArrayList<String> selectorsIP = new ArrayList<>(Arrays.asList("55.55.55.55", "5.6.7.8", "10.20.30.40", "13.14.15.16", "21.22.23.24"));
 
   // Encryption variables -- Paillier mechanisms are tested in the Paillier test code, so these are fixed...
   public static int hashBitSize = 12;
@@ -75,7 +74,7 @@ public class BaseTests
     logger.info("Running testDNSHostnameQuery(): ");
 
     int numExpectedResults = 6;
-    ArrayList<QueryResponseJSON> results = null;
+    ArrayList<QueryResponseJSON> results;
     if (isDistributed)
     {
       results = DistTestSuite.performQuery(Inputs.DNS_HOSTNAME_QUERY, selectorsDomain, fs, isSpark, numThreads);
@@ -100,12 +99,12 @@ public class BaseTests
       }
 
       // Check that each qname appears once in the result set
-      HashSet<String> correctQnames = new HashSet<String>();
+      HashSet<String> correctQnames = new HashSet<>();
       correctQnames.add("a.b.c.com");
       correctQnames.add("d.e.com");
       correctQnames.add("something.else");
 
-      HashSet<String> resultQnames = new HashSet<String>();
+      HashSet<String> resultQnames = new HashSet<>();
       for (QueryResponseJSON qrJSON : results)
       {
         resultQnames.add((String) qrJSON.getValue(Inputs.QNAME));
@@ -138,7 +137,7 @@ public class BaseTests
         removeTailElements = 3;
       }
 
-      ArrayList<QueryResponseJSON> correctResults = new ArrayList<QueryResponseJSON>();
+      ArrayList<QueryResponseJSON> correctResults = new ArrayList<>();
       int i = 0;
       while (i < (dataElements.size() - removeTailElements))
       {
@@ -197,7 +196,7 @@ public class BaseTests
   {
     logger.info("Running testDNSIPQuery(): ");
 
-    ArrayList<QueryResponseJSON> results = null;
+    ArrayList<QueryResponseJSON> results;
     if (isDistributed)
     {
       results = DistTestSuite.performQuery(Inputs.DNS_IP_QUERY, selectorsIP, fs, isSpark, numThreads);
@@ -218,7 +217,7 @@ public class BaseTests
     }
     printResultList(results);
 
-    ArrayList<QueryResponseJSON> correctResults = new ArrayList<QueryResponseJSON>();
+    ArrayList<QueryResponseJSON> correctResults = new ArrayList<>();
     int i = 0;
     while (i < (dataElements.size() - 3)) // last three data elements not hit - one on stoplist, two don't match selectors
     {
@@ -270,7 +269,7 @@ public class BaseTests
   {
     logger.info("Running testDNSNXDOMAINQuery(): ");
 
-    ArrayList<QueryResponseJSON> results = null;
+    ArrayList<QueryResponseJSON> results;
     if (isDistributed)
     {
       results = DistTestSuite.performQuery(Inputs.DNS_NXDOMAIN_QUERY, selectorsDomain, fs, isSpark, numThreads);
@@ -286,7 +285,7 @@ public class BaseTests
       fail("results.size() = " + results.size() + " -- must equal 1");
     }
 
-    ArrayList<QueryResponseJSON> correctResults = new ArrayList<QueryResponseJSON>();
+    ArrayList<QueryResponseJSON> correctResults = new ArrayList<>();
     int i = 0;
     while (i < dataElements.size())
     {
@@ -332,7 +331,7 @@ public class BaseTests
   {
     logger.info("Running testSRCIPQuery(): ");
 
-    ArrayList<QueryResponseJSON> results = null;
+    ArrayList<QueryResponseJSON> results;
     int removeTailElements = 0;
     int numExpectedResults = 1;
     if (isDistributed)
@@ -352,7 +351,7 @@ public class BaseTests
       fail("results.size() = " + results.size() + " -- must equal " + numExpectedResults);
     }
 
-    ArrayList<QueryResponseJSON> correctResults = new ArrayList<QueryResponseJSON>();
+    ArrayList<QueryResponseJSON> correctResults = new ArrayList<>();
     int i = 0;
     while (i < (dataElements.size() - removeTailElements))
     {
@@ -404,7 +403,7 @@ public class BaseTests
   {
     logger.info("Running testSRCIPQueryNoFilter(): ");
 
-    ArrayList<QueryResponseJSON> results = null;
+    ArrayList<QueryResponseJSON> results;
     int numExpectedResults = 3;
     if (isDistributed)
     {
@@ -421,7 +420,7 @@ public class BaseTests
       fail("results.size() = " + results.size() + " -- must equal " + numExpectedResults);
     }
 
-    ArrayList<QueryResponseJSON> correctResults = new ArrayList<QueryResponseJSON>();
+    ArrayList<QueryResponseJSON> correctResults = new ArrayList<>();
     int i = 0;
     while (i < dataElements.size())
     {
@@ -471,9 +470,9 @@ public class BaseTests
   // Method to convert a ArrayList<String> into the correct (padded) returned ArrayList
   private static ArrayList<String> parseArray(JSONObject dataMap, String fieldName, boolean isIP)
   {
-    ArrayList<String> retArray = new ArrayList<String>();
+    ArrayList<String> retArray = new ArrayList<>();
 
-    ArrayList<String> values = null;
+    ArrayList<String> values;
     if (dataMap.get(fieldName) instanceof ArrayList)
     {
       values = (ArrayList<String>) dataMap.get(fieldName);
@@ -506,7 +505,7 @@ public class BaseTests
   // Method to convert a ArrayList<Short> into the correct (padded) returned ArrayList
   private static ArrayList<Short> parseShortArray(JSONObject dataMap, String fieldName)
   {
-    ArrayList<Short> retArray = new ArrayList<Short>();
+    ArrayList<Short> retArray = new ArrayList<>();
 
     ArrayList<Short> values = (ArrayList<Short>) dataMap.get(fieldName);
 
@@ -529,7 +528,7 @@ public class BaseTests
   // Method to convert the String field value to the correct returned substring
   private static String parseString(JSONObject dataMap, String fieldName)
   {
-    String ret = null;
+    String ret;
 
     String element = (String) dataMap.get(fieldName);
     int numParts = Integer.parseInt(SystemConfiguration.getProperty("pir.stringBits")) / dataPartitionBitSize;
@@ -604,7 +603,7 @@ public class BaseTests
   // Method to pull the elements of a list (either an ArrayList or JSONArray) into a HashSet
   private static HashSet<String> getSetFromList(Object list)
   {
-    HashSet<String> set = new HashSet<String>();
+    HashSet<String> set = new HashSet<>();
 
     if (list instanceof ArrayList)
     {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/test/utils/Inputs.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/test/utils/Inputs.java b/src/main/java/org/apache/pirk/test/utils/Inputs.java
index 1b362ef..5070672 100644
--- a/src/main/java/org/apache/pirk/test/utils/Inputs.java
+++ b/src/main/java/org/apache/pirk/test/utils/Inputs.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.test.utils;
 
 import java.io.File;
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -34,7 +35,6 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.data.LoadDataSchemas;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.apache.pirk.schema.data.partitioner.ISO8601DatePartitioner;
@@ -42,9 +42,10 @@ import org.apache.pirk.schema.data.partitioner.PrimitiveTypePartitioner;
 import org.apache.pirk.schema.query.LoadQuerySchemas;
 import org.apache.pirk.test.distributed.DistributedTestDriver;
 import org.apache.pirk.utils.HDFS;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -54,7 +55,7 @@ import org.w3c.dom.Element;
  */
 public class Inputs
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(Inputs.class);
 
   // Test data schema fields
   public static final String DATE = "date";
@@ -126,16 +127,16 @@ public class Inputs
   @SuppressWarnings("unchecked")
   public static ArrayList<JSONObject> createJSONDataElements()
   {
-    ArrayList<JSONObject> dataElementsJSON = new ArrayList<JSONObject>();
+    ArrayList<JSONObject> dataElementsJSON = new ArrayList<>();
 
     JSONObject jsonObj1 = new JSONObject();
     jsonObj1.put(DATE, "2016-02-20T23:29:05.000Z");
     jsonObj1.put(QNAME, "a.b.c.com"); // hits on domain selector
     jsonObj1.put(SRCIP, "55.55.55.55"); // hits on IP selector
     jsonObj1.put(DSTIP, "1.2.3.6");
-    jsonObj1.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj1.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj1.put(RCODE, 0);
-    jsonObj1.put(IPS, new ArrayList<String>(Arrays.asList("10.20.30.40", "10.20.30.60")));
+    jsonObj1.put(IPS, new ArrayList<>(Arrays.asList("10.20.30.40", "10.20.30.60")));
 
     dataElementsJSON.add(jsonObj1);
 
@@ -144,9 +145,9 @@ public class Inputs
     jsonObj2.put(QNAME, "d.e.com");
     jsonObj2.put(SRCIP, "127.128.129.130");
     jsonObj2.put(DSTIP, "1.2.3.4");
-    jsonObj2.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj2.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj2.put(RCODE, 0);
-    jsonObj2.put(IPS, new ArrayList<String>(Arrays.asList("5.6.7.8")));
+    jsonObj2.put(IPS, new ArrayList<>(Collections.singletonList("5.6.7.8")));
 
     dataElementsJSON.add(jsonObj2);
 
@@ -155,9 +156,9 @@ public class Inputs
     jsonObj3.put(QNAME, "d.e.com");
     jsonObj3.put(SRCIP, "131.132.133.134");
     jsonObj3.put(DSTIP, "9.10.11.12");
-    jsonObj3.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj3.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj3.put(RCODE, 0);
-    jsonObj3.put(IPS, new ArrayList<String>(Arrays.asList("13.14.15.16")));
+    jsonObj3.put(IPS, new ArrayList<>(Collections.singletonList("13.14.15.16")));
 
     dataElementsJSON.add(jsonObj3);
 
@@ -166,9 +167,9 @@ public class Inputs
     jsonObj4.put(QNAME, "d.e.com");
     jsonObj4.put(SRCIP, "135.136.137.138");
     jsonObj4.put(DSTIP, "17.18.19.20");
-    jsonObj4.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj4.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj4.put(RCODE, 3);
-    jsonObj4.put(IPS, new ArrayList<String>(Arrays.asList("21.22.23.24")));
+    jsonObj4.put(IPS, new ArrayList<>(Collections.singletonList("21.22.23.24")));
 
     dataElementsJSON.add(jsonObj4);
 
@@ -177,9 +178,9 @@ public class Inputs
     jsonObj5.put(QNAME, "d.e.com");
     jsonObj5.put(SRCIP, "139.140.141.142");
     jsonObj5.put(DSTIP, "25.26.27.28");
-    jsonObj5.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj5.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj5.put(RCODE, 0);
-    jsonObj5.put(IPS, new ArrayList<String>(Arrays.asList("5.6.7.8")));
+    jsonObj5.put(IPS, new ArrayList<>(Collections.singletonList("5.6.7.8")));
 
     dataElementsJSON.add(jsonObj5);
 
@@ -188,9 +189,9 @@ public class Inputs
     jsonObj6.put(QNAME, "d.e.com");
     jsonObj6.put(SRCIP, "143.144.145.146");
     jsonObj6.put(DSTIP, "33.34.35.36");
-    jsonObj6.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj6.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj6.put(RCODE, 0);
-    jsonObj6.put(IPS, new ArrayList<String>(Arrays.asList("5.6.7.8")));
+    jsonObj6.put(IPS, new ArrayList<>(Collections.singletonList("5.6.7.8")));
 
     dataElementsJSON.add(jsonObj6);
 
@@ -199,9 +200,9 @@ public class Inputs
     jsonObj7.put(QNAME, "something.else");
     jsonObj7.put(SRCIP, "1.1.1.1");
     jsonObj7.put(DSTIP, "2.2.2.2");
-    jsonObj7.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj7.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj7.put(RCODE, 0);
-    jsonObj7.put(IPS, new ArrayList<String>(Arrays.asList("3.3.3.3")));
+    jsonObj7.put(IPS, new ArrayList<>(Collections.singletonList("3.3.3.3")));
 
     dataElementsJSON.add(jsonObj7);
 
@@ -212,9 +213,9 @@ public class Inputs
     jsonObj8.put(QNAME, "something.else2");
     jsonObj8.put(SRCIP, "5.6.7.8");
     jsonObj8.put(DSTIP, "2.2.2.22");
-    jsonObj8.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj8.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj8.put(RCODE, 0);
-    jsonObj8.put(IPS, new ArrayList<String>(Arrays.asList("3.3.3.132")));
+    jsonObj8.put(IPS, new ArrayList<>(Collections.singletonList("3.3.3.132")));
 
     dataElementsJSON.add(jsonObj8);
 
@@ -224,9 +225,9 @@ public class Inputs
     jsonObj9.put(QNAME, "something.else.on.stoplist");
     jsonObj9.put(SRCIP, "55.55.55.55");
     jsonObj9.put(DSTIP, "2.2.2.232");
-    jsonObj9.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj9.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj9.put(RCODE, 0);
-    jsonObj9.put(IPS, new ArrayList<String>(Arrays.asList("3.3.3.132")));
+    jsonObj9.put(IPS, new ArrayList<>(Collections.singletonList("3.3.3.132")));
 
     dataElementsJSON.add(jsonObj9);
 
@@ -239,16 +240,16 @@ public class Inputs
   @SuppressWarnings("unchecked")
   public static ArrayList<JSONObject> getRcode3JSONDataElements()
   {
-    ArrayList<JSONObject> dataElementsJSON = new ArrayList<JSONObject>();
+    ArrayList<JSONObject> dataElementsJSON = new ArrayList<>();
 
     JSONObject jsonObj4 = new JSONObject();
     jsonObj4.put(DATE, "2016-02-20T23:29:08.000Z");
     jsonObj4.put(QNAME, "d.e.com");
     jsonObj4.put(SRCIP, "135.136.137.138");
     jsonObj4.put(DSTIP, "17.18.19.20");
-    jsonObj4.put(QTYPE, new ArrayList<Short>(Arrays.asList((short) 1)));
+    jsonObj4.put(QTYPE, new ArrayList<>(Collections.singletonList((short) 1)));
     jsonObj4.put(RCODE, 3);
-    jsonObj4.put(IPS, new ArrayList<String>(Arrays.asList("21.22.23.24")));
+    jsonObj4.put(IPS, new ArrayList<>(Collections.singletonList("21.22.23.24")));
 
     dataElementsJSON.add(jsonObj4);
 
@@ -393,9 +394,9 @@ public class Inputs
   {
     logger.info("PIR stopList file being created");
 
-    String tmpFileName = null;
+    String tmpFileName;
 
-    ArrayList<String> elements = new ArrayList<String>();
+    ArrayList<String> elements = new ArrayList<>();
     elements.add("something.else.on.stoplist");
     elements.add("3.3.3.132");
 
@@ -441,7 +442,7 @@ public class Inputs
     // Create and load the query schemas
     // DNS_HOSTNAME_QUERY
     List<String> dnsHostnameQueryElements = Arrays.asList(DATE, SRCIP, DSTIP, QTYPE, RCODE, IPS);
-    List<String> dnsHostnameQueryFilterElements = Arrays.asList(QNAME);
+    List<String> dnsHostnameQueryFilterElements = Collections.singletonList(QNAME);
 
     TestUtils.createQuerySchema(DNS_HOSTNAME_QUERY_FILE, DNS_HOSTNAME_QUERY, TEST_DATA_SCHEMA_NAME, QNAME, dnsHostnameQueryElements,
         dnsHostnameQueryFilterElements, filter);
@@ -453,7 +454,7 @@ public class Inputs
 
     // DNS_IP_QUERY
     List<String> dnsIPQueryElements = Arrays.asList(SRCIP, DSTIP, IPS);
-    List<String> dnsIPQueryFilterElements = Arrays.asList(QNAME);
+    List<String> dnsIPQueryFilterElements = Collections.singletonList(QNAME);
 
     TestUtils.createQuerySchema(DNS_IP_QUERY_FILE, DNS_IP_QUERY, TEST_DATA_SCHEMA_NAME, IPS, dnsIPQueryElements, dnsIPQueryFilterElements, filter);
     if (hdfs)
@@ -464,7 +465,7 @@ public class Inputs
 
     // DNS_NXDOMAIN_QUERY
     List<String> dnsNXQueryElements = Arrays.asList(QNAME, SRCIP, DSTIP);
-    List<String> dnsNXQueryFilterElements = Arrays.asList(QNAME);
+    List<String> dnsNXQueryFilterElements = Collections.singletonList(QNAME);
 
     TestUtils
         .createQuerySchema(DNS_NXDOMAIN_QUERY_FILE, DNS_NXDOMAIN_QUERY, TEST_DATA_SCHEMA_NAME, QNAME, dnsNXQueryElements, dnsNXQueryFilterElements, filter);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/test/utils/StandaloneQuery.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/test/utils/StandaloneQuery.java b/src/main/java/org/apache/pirk/test/utils/StandaloneQuery.java
index 027e042..aeda7dc 100644
--- a/src/main/java/org/apache/pirk/test/utils/StandaloneQuery.java
+++ b/src/main/java/org/apache/pirk/test/utils/StandaloneQuery.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,17 +15,14 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.test.utils;
 
-import static org.junit.Assert.fail;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.apache.log4j.Logger;
 import org.apache.pirk.encryption.Paillier;
 import org.apache.pirk.querier.wideskies.Querier;
 import org.apache.pirk.querier.wideskies.QuerierConst;
@@ -37,25 +34,23 @@ import org.apache.pirk.query.wideskies.QueryUtils;
 import org.apache.pirk.responder.wideskies.standalone.Responder;
 import org.apache.pirk.response.wideskies.Response;
 import org.apache.pirk.schema.response.QueryResponseJSON;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.PIRException;
 import org.apache.pirk.utils.SystemConfiguration;
 import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.junit.Assert.fail;
 
 public class StandaloneQuery
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(StandaloneQuery.class);
 
   static String queryFileDomain = "qfDomain";
   static String queryFileIP = "qfIP";
-  static String querySideOuputFilePrefix = "querySideOut"; // the file pre-fix for the query side output files
-  static String finalResultsFile = "finalResultFile"; // file to hold the final results
 
   String testDataSchemaName = "testDataSchema";
   String testQuerySchemaName = "testQuerySchema";
 
-  static String responseFile = "encryptedResponse"; // the PIR response file from the responder
-
   // Base method to perform the query
   public static ArrayList<QueryResponseJSON> performStandaloneQuery(ArrayList<JSONObject> dataElements, String queryType, ArrayList<String> selectors,
       int numThreads, boolean testFalsePositive) throws IOException, InterruptedException, PIRException
@@ -65,9 +60,12 @@ public class StandaloneQuery
     ArrayList<QueryResponseJSON> results = null;
 
     // Create the necessary files
+    String querySideOuputFilePrefix = "querySideOut";
     File fileQuerier = File.createTempFile(querySideOuputFilePrefix + "-" + QuerierConst.QUERIER_FILETAG, ".txt");
     File fileQuery = File.createTempFile(querySideOuputFilePrefix + "-" + QuerierConst.QUERY_FILETAG, ".txt");
+    String responseFile = "encryptedResponse";
     File fileResponse = File.createTempFile(responseFile, ".txt");
+    String finalResultsFile = "finalResultFile";
     File fileFinalResults = File.createTempFile(finalResultsFile, ".txt");
 
     logger.info("fileQuerier = " + fileQuerier.getAbsolutePath() + " fileQuery  = " + fileQuery.getAbsolutePath() + " responseFile = "

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/test/utils/TestUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/test/utils/TestUtils.java b/src/main/java/org/apache/pirk/test/utils/TestUtils.java
index 11348cb..57af5c4 100644
--- a/src/main/java/org/apache/pirk/test/utils/TestUtils.java
+++ b/src/main/java/org/apache/pirk/test/utils/TestUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.test.utils;
 
 import java.io.BufferedReader;
@@ -38,10 +38,10 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.pirk.schema.response.QueryResponseJSON;
-import org.apache.pirk.utils.LogUtils;
 import org.apache.pirk.utils.SystemConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -51,7 +51,7 @@ import org.w3c.dom.Element;
  */
 public class TestUtils
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(TestUtils.class);
 
   /**
    * Method to delete an ES index
@@ -81,7 +81,7 @@ public class TestUtils
 
     // Read the output from the command
     logger.info("Standard output of the command:\n");
-    String s = null;
+    String s;
     while ((s = stdInput.readLine()) != null)
     {
       logger.info(s);
@@ -142,7 +142,7 @@ public class TestUtils
     logger.info("createQuerySchema: querySchemaName = " + querySchemaName);
 
     // Create a temporary file for the test schema, set in the properties
-    String fileName = null;
+    String fileName;
     File file = null;
     OutputStreamWriter osw = null;
     if (hdfs)
@@ -237,7 +237,7 @@ public class TestUtils
       TransformerFactory transformerFactory = TransformerFactory.newInstance();
       Transformer transformer = transformerFactory.newTransformer();
       DOMSource source = new DOMSource(doc);
-      StreamResult result = null;
+      StreamResult result;
       if (hdfs)
       {
         result = new StreamResult(osw);
@@ -269,7 +269,7 @@ public class TestUtils
    */
   public static ArrayList<QueryResponseJSON> readResultsFile(File file)
   {
-    ArrayList<QueryResponseJSON> results = new ArrayList<QueryResponseJSON>();
+    ArrayList<QueryResponseJSON> results = new ArrayList<>();
     try
     {
       FileReader fr = new FileReader(file);
@@ -295,7 +295,7 @@ public class TestUtils
    */
   public static String writeToTmpFile(ArrayList<String> list, String fileName, String suffix) throws IOException
   {
-    String filename = null;
+    String filename;
 
     File file = File.createTempFile(fileName, suffix);
     file.deleteOnExit();

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/CSVOutputUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/CSVOutputUtils.java b/src/main/java/org/apache/pirk/utils/CSVOutputUtils.java
index ebb1f21..311fe87 100644
--- a/src/main/java/org/apache/pirk/utils/CSVOutputUtils.java
+++ b/src/main/java/org/apache/pirk/utils/CSVOutputUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,11 +15,12 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Utils class for CSV value output
@@ -31,7 +32,7 @@ public class CSVOutputUtils
 {
   public static String EMPTYFIELD = "";
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(CSVOutputUtils.class);
 
   public static Text setCSVOutput(String domain, String ip, String timestamp)
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/EpochDateParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/EpochDateParser.java b/src/main/java/org/apache/pirk/utils/EpochDateParser.java
index 388726f..870128c 100644
--- a/src/main/java/org/apache/pirk/utils/EpochDateParser.java
+++ b/src/main/java/org/apache/pirk/utils/EpochDateParser.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,10 +15,11 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to parse dates in Epoch date format
@@ -26,7 +27,7 @@ import org.apache.log4j.Logger;
 public class EpochDateParser
 {
 
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(EpochDateParser.class);
 
   public static boolean isEpochDateFormat(String date)
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/FileConst.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/FileConst.java b/src/main/java/org/apache/pirk/utils/FileConst.java
index 83e43d8..382b97d 100644
--- a/src/main/java/org/apache/pirk/utils/FileConst.java
+++ b/src/main/java/org/apache/pirk/utils/FileConst.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/FileIOUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/FileIOUtils.java b/src/main/java/org/apache/pirk/utils/FileIOUtils.java
index 52bde2e..17b97ec 100644
--- a/src/main/java/org/apache/pirk/utils/FileIOUtils.java
+++ b/src/main/java/org/apache/pirk/utils/FileIOUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.io.BufferedReader;
@@ -29,14 +29,15 @@ import java.util.AbstractCollection;
 import java.util.ArrayList;
 import java.util.HashSet;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class holding basic fileIO utils
  */
 public class FileIOUtils
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(FileIOUtils.class);
 
   public interface Callable<V>
   {

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/HDFS.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/HDFS.java b/src/main/java/org/apache/pirk/utils/HDFS.java
index 8f3992e..32e0c05 100644
--- a/src/main/java/org/apache/pirk/utils/HDFS.java
+++ b/src/main/java/org/apache/pirk/utils/HDFS.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.io.BufferedReader;
@@ -33,15 +33,16 @@ import java.util.Map;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class for basic HDFS fileIO utils
  */
 public class HDFS
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(HDFS.class);
 
   public static void writeFile(Collection<String> elements, FileSystem fs, String path, boolean deleteOnExit)
   {
@@ -190,7 +191,7 @@ public class HDFS
   public static HashSet<String> readFileHashSet(FileSystem fs, Path path)
   {
 
-    HashSet<String> rv = new HashSet<String>();
+    HashSet<String> rv = new HashSet<>();
     try
     {
       InputStreamReader isr = new InputStreamReader(fs.open(path));

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/ISO8601DateParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/ISO8601DateParser.java b/src/main/java/org/apache/pirk/utils/ISO8601DateParser.java
index 0826322..675fb21 100755
--- a/src/main/java/org/apache/pirk/utils/ISO8601DateParser.java
+++ b/src/main/java/org/apache/pirk/utils/ISO8601DateParser.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.text.ParseException;
@@ -23,7 +23,8 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.TimeZone;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class to parse a date in ISO86091 format
@@ -31,7 +32,7 @@ import org.apache.log4j.Logger;
  */
 public class ISO8601DateParser
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(ISO8601DateParser.class);
 
   static
   {
@@ -51,7 +52,7 @@ public class ISO8601DateParser
     try
     {
       return format.parse(date).getTime() + "";
-    } catch (Exception e)
+    } catch (Exception ignore)
     {}
 
     return null;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/KeyedHash.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/KeyedHash.java b/src/main/java/org/apache/pirk/utils/KeyedHash.java
index 481108e..579b196 100644
--- a/src/main/java/org/apache/pirk/utils/KeyedHash.java
+++ b/src/main/java/org/apache/pirk/utils/KeyedHash.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,13 +15,14 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class for the PIR keyed hash
@@ -31,7 +32,7 @@ import org.apache.log4j.Logger;
  */
 public class KeyedHash
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(KeyedHash.class);
 
   /**
    * Hash method that uses the java String hashCode()
@@ -58,9 +59,9 @@ public class KeyedHash
    */
   public static int hash(String key, int bitSize, String input, String hashType)
   {
-    int bitLimitedHash = 0;
+    int bitLimitedHash;
 
-    MessageDigest md = null;
+    MessageDigest md;
     try
     {
       md = MessageDigest.getInstance(hashType);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/LogUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/LogUtils.java b/src/main/java/org/apache/pirk/utils/LogUtils.java
deleted file mode 100755
index d10d43b..0000000
--- a/src/main/java/org/apache/pirk/utils/LogUtils.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *******************************************************************************/
-package org.apache.pirk.utils;
-
-import java.io.InputStream;
-import java.util.Properties;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-
-/**
- * Class for basic logging utils
- */
-public class LogUtils
-{
-  public static Logger logger;
-
-  static
-  {
-    initialize();
-  }
-
-  public static void initialize()
-  {
-    Properties props = new Properties();
-    try
-    {
-      String log4jFilename = SystemConfiguration.getProperty("log4jPropertiesFile");
-      if (log4jFilename == null)
-      {
-        System.err.println("log4jPropertiesFile property not found during LogUtils initialization.");
-      }
-      else
-      {
-        InputStream stream = SystemConfiguration.class.getClassLoader().getResourceAsStream(log4jFilename);
-        if (stream != null)
-        {
-          System.out.println("Loading log4j properties file: '" + log4jFilename + "'");
-          props.load(stream);
-          PropertyConfigurator.configure(props);
-          stream.close();
-        }
-        else
-        {
-          System.err.println("log4j properties file not found: '" + log4jFilename + "'");
-        }
-      }
-    } catch (Exception e)
-    {
-      System.err.println("Exception occured configuring the log4j system: " + e.toString());
-      e.printStackTrace();
-    }
-  }
-
-  /**
-   * Should be called at the from from each class using log4j. Example: static private Logger logger = LogUtils.getLoggerForThisClass();
-   * 
-   * @return
-   */
-  public static Logger getLoggerForThisClass()
-  {
-    // We use the third stack element; second is this method, first is
-    // .getStackTrace()
-    StackTraceElement myCaller = Thread.currentThread().getStackTrace()[2];
-    return Logger.getLogger(myCaller.getClassName());
-  }
-
-  /**
-   * Returns the name of the class calling this method.
-   * 
-   */
-  public static String getNameForThisClass()
-  {
-    // We use the third stack element; second is this method, first is
-    // .getStackTrace()
-    StackTraceElement myCaller = Thread.currentThread().getStackTrace()[2];
-    return myCaller.getClassName();
-  }
-
-  public static String entering()
-  {
-    StackTraceElement myCaller = Thread.currentThread().getStackTrace()[2];
-    String methodName = myCaller.getMethodName();
-    return entering(methodName);
-  }
-
-  public static String exiting()
-  {
-    StackTraceElement myCaller = Thread.currentThread().getStackTrace()[2];
-    String methodName = myCaller.getMethodName();
-    return exiting(methodName);
-  }
-
-  public static String entering(String methodName)
-  {
-    return String.format("Entering %s", methodName);
-  }
-
-  public static String exiting(String methodName)
-  {
-    return String.format("Exiting %s", methodName);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/PIRException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/PIRException.java b/src/main/java/org/apache/pirk/utils/PIRException.java
index 9010c0f..7ec9c8b 100644
--- a/src/main/java/org/apache/pirk/utils/PIRException.java
+++ b/src/main/java/org/apache/pirk/utils/PIRException.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/QueryParserUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/QueryParserUtils.java b/src/main/java/org/apache/pirk/utils/QueryParserUtils.java
index 5bc9794..afef6c9 100644
--- a/src/main/java/org/apache/pirk/utils/QueryParserUtils.java
+++ b/src/main/java/org/apache/pirk/utils/QueryParserUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,21 +15,23 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.text.ParseException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Map;
 import java.util.regex.Pattern;
 
 import org.apache.hadoop.io.MapWritable;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 import org.apache.pirk.inputformat.hadoop.TextArrayWritable;
 import org.apache.pirk.schema.data.DataSchema;
 import org.apache.pirk.schema.data.partitioner.IPDataPartitioner;
 import org.elasticsearch.hadoop.mr.WritableArrayWritable;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class used for URI query parsing
@@ -41,7 +43,7 @@ import org.elasticsearch.hadoop.mr.WritableArrayWritable;
  */
 public class QueryParserUtils
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(QueryParserUtils.class);
 
   /**
    * Given a URI query string, checks to see if the given document satisfies the query
@@ -73,7 +75,7 @@ public class QueryParserUtils
 
     String[] queryTokens = uriQuery.split("\\+(?=AND)|\\+(?=OR)|\\+(?=[a-z])"); // booleans of the form +AND+, +OR+, don't split on +T0+
     int index = 0;
-    String item = null;
+    String item;
     while (index < queryTokens.length)
     {
       boolean ignoreCase = false;
@@ -227,7 +229,7 @@ public class QueryParserUtils
       {
         if (queryTokens[index].equals("AND")) // Do nothing and keep going
         {
-          if (satisfiesQuery == false)
+          if (!satisfiesQuery)
           {
             break;
           }
@@ -247,7 +249,7 @@ public class QueryParserUtils
             satisfiesQuery = true; // reset so that we pick up matches for the next term
           }
         }
-        else if (satisfiesQuery == false)
+        else if (!satisfiesQuery)
         {
           logger.debug("Does not satisfy the query and no boolean ops next...");
           break;
@@ -274,7 +276,7 @@ public class QueryParserUtils
 
     String[] queryTokens = uriQuery.split("\\+(?=AND)|\\+(?=OR)|\\+(?=[a-z])"); // booleans of the form +AND+, +OR+, don't split on +T0+
     int index = 0;
-    String item = null;
+    String item;
     while (index < queryTokens.length)
     {
       item = queryTokens[index];
@@ -374,12 +376,12 @@ public class QueryParserUtils
               logger.debug("itemTokens[1] = " + itemTokens[1] + " contains wildcard");
               if (!Pattern.matches(wildcardToRegex(itemTokens[1]), (String) value))
               {
-                logger.debug("stringValue = " + (String) value + " did not satisfy itemTokens[1] = " + itemTokens[1]);
+                logger.debug("stringValue = " + value + " did not satisfy itemTokens[1] = " + itemTokens[1]);
                 satisfiesQuery = false;
               }
-              logger.debug("stringValue = " + (String) value + " did satisfy itemTokens[1] = " + itemTokens[1]);
+              logger.debug("stringValue = " + value + " did satisfy itemTokens[1] = " + itemTokens[1]);
             }
-            else if (!((String) value).equals(itemTokens[1])) // Single value match
+            else if (!(value).equals(itemTokens[1])) // Single value match
             {
               logger.debug("We do not have a single value match: stringValue " + (String) value + " != itemTokens[1] = " + itemTokens[1]);
               satisfiesQuery = false;
@@ -427,7 +429,7 @@ public class QueryParserUtils
       {
         if (queryTokens[index].equals("AND")) // Do nothing and keep going
         {
-          if (satisfiesQuery == false)
+          if (!satisfiesQuery)
           {
             break;
           }
@@ -447,7 +449,7 @@ public class QueryParserUtils
             satisfiesQuery = true; // reset so that we pick up matches for the next term
           }
         }
-        else if (satisfiesQuery == false)
+        else if (!satisfiesQuery)
         {
           logger.debug("Does not satisfy the query and no boolean ops next...");
           break;
@@ -474,7 +476,7 @@ public class QueryParserUtils
 
     String[] queryTokens = uriQuery.split("\\+(?=AND)|\\+(?=OR)|\\+(?=[a-z])"); // booleans of the form +AND+, +OR+, don't split on +T0+
     int index = 0;
-    String item = null;
+    String item;
     while (index < queryTokens.length)
     {
       boolean ignoreCase = false;
@@ -628,7 +630,7 @@ public class QueryParserUtils
       {
         if (queryTokens[index].equals("AND")) // Do nothing and keep going
         {
-          if (satisfiesQuery == false)
+          if (!satisfiesQuery)
           {
             break;
           }
@@ -648,7 +650,7 @@ public class QueryParserUtils
             satisfiesQuery = true; // reset so that we pick up matches for the next term
           }
         }
-        else if (satisfiesQuery == false)
+        else if (!satisfiesQuery)
         {
           logger.debug("Does not satisfy the query and no boolean ops next...");
           break;
@@ -690,7 +692,7 @@ public class QueryParserUtils
       String[] ranges = query.split("\\+TO\\+");
       logger.info("ranges[0] = " + ranges[0] + " ranges[1] = " + ranges[1]);
 
-      if ((inclusive == false) && (value.equals(ranges[0]) || value.equals(ranges[1])))
+      if ((!inclusive) && (value.equals(ranges[0]) || value.equals(ranges[1])))
       {
         logger.debug("inclusive = false and either value.equals(ranges[0]) or value.equals(ranges[1])");
         matches = false;
@@ -769,10 +771,10 @@ public class QueryParserUtils
           toMilli = Integer.parseInt(toDateArr[1]);
         } catch (Exception e)
         {
-          logger.info(e.getStackTrace().toString());
+          logger.info(Arrays.toString(e.getStackTrace()));
         }
 
-        if ((inclusive == false) && (fromDate == valueDate || toDate == valueDate))
+        if ((!inclusive) && (fromDate == valueDate || toDate == valueDate))
         {
           logger.debug("(inclusive == false) && (fromDate == valueDate || toDate == valueDate))");
           matches = false;
@@ -800,7 +802,7 @@ public class QueryParserUtils
         {
           e.printStackTrace();
         }
-        if ((inclusive == false) && (lower == valueDate || upper == valueDate))
+        if ((!inclusive) && (lower == valueDate || upper == valueDate))
         {
           logger.debug("(inclusive == false) && (lower == valueDate || upper == valueDate))");
           matches = false;
@@ -830,7 +832,7 @@ public class QueryParserUtils
       int valueInt = Integer.parseInt(value);
       logger.debug("valueInt = " + valueInt + " lower = " + lower + " upper = " + upper);
 
-      if ((inclusive == false) && (lower == valueInt || upper == valueInt))
+      if ((!inclusive) && (lower == valueInt || upper == valueInt))
       {
         logger.debug("(inclusive == false) && (lower == valueInt || upper == valueInt))");
         matches = false;
@@ -855,7 +857,7 @@ public class QueryParserUtils
    */
   public static String wildcardToRegex(String wildcard)
   {
-    StringBuffer s = new StringBuffer(wildcard.length());
+    StringBuilder s = new StringBuilder(wildcard.length());
     for (int i = 0, is = wildcard.length(); i < is; i++)
     {
       char c = wildcard.charAt(i);

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/StopListUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/StopListUtils.java b/src/main/java/org/apache/pirk/utils/StopListUtils.java
index 2019fe1..285179e 100644
--- a/src/main/java/org/apache/pirk/utils/StopListUtils.java
+++ b/src/main/java/org/apache/pirk/utils/StopListUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.util.HashSet;

http://git-wip-us.apache.org/repos/asf/incubator-pirk/blob/ef8d1c1a/src/main/java/org/apache/pirk/utils/StringUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/pirk/utils/StringUtils.java b/src/main/java/org/apache/pirk/utils/StringUtils.java
index 9ac0279..be8ea09 100755
--- a/src/main/java/org/apache/pirk/utils/StringUtils.java
+++ b/src/main/java/org/apache/pirk/utils/StringUtils.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.apache.pirk.utils;
 
 import java.util.ArrayList;
@@ -27,12 +27,13 @@ import org.apache.hadoop.io.ArrayWritable;
 import org.apache.hadoop.io.MapWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 import org.apache.pirk.schema.data.DataSchema;
 import org.elasticsearch.hadoop.mr.WritableArrayWritable;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
+import org.slf4j.LoggerFactory;
 
 /**
  * Pirk-specific string utilities
@@ -40,7 +41,7 @@ import org.json.simple.parser.ParseException;
  */
 public class StringUtils
 {
-  private static Logger logger = LogUtils.getLoggerForThisClass();
+  private static final Logger logger = LoggerFactory.getLogger(StringUtils.class);
 
   /**
    * Method to convert a MapWritable into a JSON string
@@ -176,7 +177,7 @@ public class StringUtils
    */
   public static Map<String,Object> jsonStringToMap(String jsonString, DataSchema dataSchema)
   {
-    Map<String,Object> value = new HashMap<String,Object>();
+    Map<String,Object> value = new HashMap<>();
     JSONParser jsonParser = new JSONParser();
 
     try
@@ -255,7 +256,7 @@ public class StringUtils
     modString = modString.replaceAll("\"", "");
     String[] elements = modString.split("\\s*,\\s*");
 
-    return new ArrayList<String>(Arrays.asList(elements));
+    return new ArrayList<>(Arrays.asList(elements));
   }
 
   /**
@@ -266,8 +267,6 @@ public class StringUtils
     String modString = jsonString.replaceFirst("\\[", "");
     modString = modString.replaceFirst("\\]", "");
     modString = modString.replaceAll("\"", "");
-    String[] elements = modString.split("\\s*,\\s*");
-
-    return elements;
+    return modString.split("\\s*,\\s*");
   }
 }