incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [3/17] git commit: Changing license header to Apache for blur-store.
Date Mon, 03 Sep 2012 02:25:02 GMT
Changing license header to Apache for blur-store.


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

Branch: refs/heads/master
Commit: 283c6a45bc920ce987b38341c8ec6032aae66e1a
Parents: b274ab4
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sun Sep 2 22:15:40 2012 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Sep 2 22:15:40 2012 -0400

----------------------------------------------------------------------
 src/blur-store/pom.xml                             |   19 ++
 .../com/nearinfinity/blur/index/IndexWriter.java   |   22 ++-
 .../nearinfinity/blur/lucene/EscapeRewrite.java    |   16 ++
 .../nearinfinity/blur/lucene/LuceneConstant.java   |   18 ++-
 .../com/nearinfinity/blur/store/BufferStore.java   |   40 +++--
 .../blur/store/CustomBufferedIndexInput.java       |  105 ++++++------
 .../blur/store/blockcache/BlockCache.java          |   28 +++-
 .../blur/store/blockcache/BlockCacheKey.java       |  131 ++++++++-------
 .../blur/store/blockcache/BlockCacheLocation.java  |  101 +++++++-----
 .../blur/store/blockcache/BlockDirectory.java      |   16 ++
 .../blur/store/blockcache/BlockDirectoryCache.java |   26 +++-
 .../blur/store/blockcache/BlockLocks.java          |   24 +++-
 .../nearinfinity/blur/store/blockcache/Cache.java  |   19 ++
 .../compressed/CompressedFieldDataDirectory.java   |   26 ++--
 .../blur/store/hdfs/ChangeFileExt.java             |   18 ++-
 .../blur/store/hdfs/ConvertDirectory.java          |   16 ++
 .../blur/store/hdfs/CopyFromHdfsLocal.java         |   22 ++-
 .../blur/store/hdfs/HdfsDirectory.java             |   22 ++--
 .../blur/store/hdfs/HdfsFileReader.java            |   16 ++
 .../blur/store/hdfs/HdfsFileWriter.java            |   24 +++-
 .../blur/store/hdfs/HdfsMetaBlock.java             |   16 ++
 .../blur/store/hdfs/NullIndexOutput.java           |   16 ++
 .../blur/store/lock/BlurLockFactory.java           |   17 ++
 .../apache/lucene/index/WarmUpByFieldBounds.java   |   17 ++-
 .../lucene/index/WarmUpByFieldBoundsStatus.java    |   16 ++
 .../blur/store/BenchmarkDirectory.java             |   16 ++
 .../blur/store/BenchmarkDirectoryNrt.java          |   16 ++
 .../nearinfinity/blur/store/HdfsDirectoryTest.java |   48 ++++--
 .../com/nearinfinity/blur/store/UsingHdfsDir.java  |   47 ++++--
 .../blur/store/blockcache/BlockCacheTest.java      |   22 ++-
 .../blur/store/blockcache/BlockDirectoryTest.java  |   16 ++
 .../CompressedFieldDataDirectoryTest.java          |   16 ++
 32 files changed, 719 insertions(+), 253 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/pom.xml
----------------------------------------------------------------------
diff --git a/src/blur-store/pom.xml b/src/blur-store/pom.xml
index 5540ca0..6653d48 100644
--- a/src/blur-store/pom.xml
+++ b/src/blur-store/pom.xml
@@ -1,3 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+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.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<parent>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/index/IndexWriter.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/index/IndexWriter.java b/src/blur-store/src/main/java/com/nearinfinity/blur/index/IndexWriter.java
index 57a731e..5cca4db 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/index/IndexWriter.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/index/IndexWriter.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.index;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 import java.lang.reflect.Field;
 
@@ -18,7 +34,7 @@ public class IndexWriter extends org.apache.lucene.index.IndexWriter {
     try {
       internalLock = getInternalLock();
     } catch (Exception e) {
-      throw new RuntimeException("Could not get the write lock instance.",e);
+      throw new RuntimeException("Could not get the write lock instance.", e);
     }
   }
 
@@ -32,7 +48,7 @@ public class IndexWriter extends org.apache.lucene.index.IndexWriter {
   protected void doAfterFlush() throws IOException {
     super.doAfterFlush();
     if (!internalLock.isLocked()) {
-      throw new IOException("Lock [" + internalLock +"] no longer has write lock.");
+      throw new IOException("Lock [" + internalLock + "] no longer has write lock.");
     }
   }
 
@@ -40,7 +56,7 @@ public class IndexWriter extends org.apache.lucene.index.IndexWriter {
   protected void doBeforeFlush() throws IOException {
     super.doBeforeFlush();
     if (!internalLock.isLocked()) {
-      throw new IOException("Lock [" + internalLock +"] no longer has write lock.");
+      throw new IOException("Lock [" + internalLock + "] no longer has write lock.");
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/EscapeRewrite.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/EscapeRewrite.java b/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/EscapeRewrite.java
index 6a5779c..dfa3c9b 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/EscapeRewrite.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/EscapeRewrite.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.lucene;
 
+/**
+ * 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.
+ */
 import java.io.File;
 import java.io.IOException;
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/LuceneConstant.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/LuceneConstant.java b/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/LuceneConstant.java
index 781663a..b38d85e 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/LuceneConstant.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/lucene/LuceneConstant.java
@@ -1,9 +1,25 @@
 package com.nearinfinity.blur.lucene;
 
+/**
+ * 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.
+ */
 import org.apache.lucene.util.Version;
 
 public class LuceneConstant {
-  
+
   public static final Version LUCENE_VERSION = Version.LUCENE_36;
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/BufferStore.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/BufferStore.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/BufferStore.java
index 9652d35..a0d8206 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/BufferStore.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/BufferStore.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store;
 
+/**
+ * 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.
+ */
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.atomic.AtomicLong;
@@ -10,23 +26,23 @@ import com.nearinfinity.blur.log.LogFactory;
 import com.nearinfinity.blur.metrics.BlurMetrics;
 
 public class BufferStore {
-  
+
   private static final Log LOG = LogFactory.getLog(BufferStore.class);
-  
-  private static BlockingQueue<byte[]> _1024 = setupBuffers(1024,1);
-  private static BlockingQueue<byte[]> _8192 = setupBuffers(8192,1);
+
+  private static BlockingQueue<byte[]> _1024 = setupBuffers(1024, 1);
+  private static BlockingQueue<byte[]> _8192 = setupBuffers(8192, 1);
   public static AtomicLong _blurShardBuffercacheLost = new AtomicLong();
   public static AtomicLong _blurShardBuffercacheAllocate1024 = new AtomicLong();
   public static AtomicLong _blurShardBuffercacheAllocate8192 = new AtomicLong();
   public static AtomicLong _blurShardBuffercacheAllocateOther = new AtomicLong();
-  
+
   public static void init(BlurConfiguration configuration, BlurMetrics metrics) {
     int _1024Size = configuration.getInt("blur.shard.buffercache.1024", 8192);
     int _8192Size = configuration.getInt("blur.shard.buffercache.8192", 8192);
-    LOG.info("Initializing the 1024 buffers with [{0}] buffers.",_1024Size);
-    _1024 = setupBuffers(1024,_1024Size);
-    LOG.info("Initializing the 8192 buffers with [{0}] buffers.",_8192Size);
-    _8192 = setupBuffers(8192,_8192Size);
+    LOG.info("Initializing the 1024 buffers with [{0}] buffers.", _1024Size);
+    _1024 = setupBuffers(1024, _1024Size);
+    LOG.info("Initializing the 8192 buffers with [{0}] buffers.", _8192Size);
+    _8192 = setupBuffers(8192, _8192Size);
     _blurShardBuffercacheLost = metrics.blurShardBuffercacheLost;
     _blurShardBuffercacheAllocate1024 = metrics.blurShardBuffercacheAllocate1024;
     _blurShardBuffercacheAllocate8192 = metrics.blurShardBuffercacheAllocate8192;
@@ -51,7 +67,7 @@ public class BufferStore {
       return newBuffer(bufferSize);
     }
   }
-  
+
   public static void putBuffer(byte[] buffer) {
     if (buffer == null) {
       return;
@@ -72,7 +88,7 @@ public class BufferStore {
       _blurShardBuffercacheLost.incrementAndGet();
     }
   }
-  
+
   private static byte[] newBuffer1024(byte[] buf) {
     if (buf != null) {
       return buf;
@@ -80,7 +96,7 @@ public class BufferStore {
     _blurShardBuffercacheAllocate1024.incrementAndGet();
     return new byte[1024];
   }
-  
+
   private static byte[] newBuffer8192(byte[] buf) {
     if (buf != null) {
       return buf;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/CustomBufferedIndexInput.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/CustomBufferedIndexInput.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/CustomBufferedIndexInput.java
index 2a64a2c..8fb7f74 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/CustomBufferedIndexInput.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/CustomBufferedIndexInput.java
@@ -27,12 +27,12 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
   public static final int BUFFER_SIZE = 1024;
 
   private int bufferSize = BUFFER_SIZE;
-  
+
   protected byte[] buffer;
-  
-  private long bufferStart = 0;			  // position in file of buffer
-  private int bufferLength = 0;			  // end of valid bytes
-  private int bufferPosition = 0;		  // next byte to read
+
+  private long bufferStart = 0; // position in file of buffer
+  private int bufferLength = 0; // end of valid bytes
+  private int bufferPosition = 0; // next byte to read
 
   @Override
   public byte readByte() throws IOException {
@@ -64,33 +64,33 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
   @Override
   public void readBytes(byte[] b, int offset, int len, boolean useBuffer) throws IOException {
 
-    if(len <= (bufferLength-bufferPosition)){
+    if (len <= (bufferLength - bufferPosition)) {
       // the buffer contains enough data to satisfy this request
-      if(len>0) // to allow b to be null if len is 0...
+      if (len > 0) // to allow b to be null if len is 0...
         System.arraycopy(buffer, bufferPosition, b, offset, len);
-      bufferPosition+=len;
+      bufferPosition += len;
     } else {
       // the buffer does not have enough data. First serve all we've got.
       int available = bufferLength - bufferPosition;
-      if(available > 0){
+      if (available > 0) {
         System.arraycopy(buffer, bufferPosition, b, offset, available);
         offset += available;
         len -= available;
         bufferPosition += available;
       }
       // and now, read the remaining 'len' bytes:
-      if (useBuffer && len<bufferSize){
+      if (useBuffer && len < bufferSize) {
         // If the amount left to read is small enough, and
         // we are allowed to use our buffer, do it in the usual
         // buffered way: fill the buffer and copy from it:
         refill();
-        if(bufferLength<len){
+        if (bufferLength < len) {
           // Throw an exception when refill() could not read len bytes:
           System.arraycopy(buffer, 0, b, offset, bufferLength);
           throw new IOException("read past EOF");
         } else {
           System.arraycopy(buffer, 0, b, offset, len);
-          bufferPosition=len;
+          bufferPosition = len;
         }
       } else {
         // The amount left to read is larger than the buffer
@@ -100,35 +100,34 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
         // this function, there is no need to do a seek
         // here, because there's no need to reread what we
         // had in the buffer.
-        long after = bufferStart+bufferPosition+len;
-        if(after > length())
+        long after = bufferStart + bufferPosition + len;
+        if (after > length())
           throw new IOException("read past EOF");
         readInternal(b, offset, len);
         bufferStart = after;
         bufferPosition = 0;
-        bufferLength = 0;                    // trigger refill() on read
+        bufferLength = 0; // trigger refill() on read
       }
     }
   }
-  
+
   @Override
   public int readInt() throws IOException {
-    if (4 <= (bufferLength-bufferPosition)) {
-      return ((buffer[bufferPosition++] & 0xFF) << 24) | ((buffer[bufferPosition++] & 0xFF) << 16)
-        | ((buffer[bufferPosition++] & 0xFF) <<  8) |  (buffer[bufferPosition++] & 0xFF);
+    if (4 <= (bufferLength - bufferPosition)) {
+      return ((buffer[bufferPosition++] & 0xFF) << 24) | ((buffer[bufferPosition++] & 0xFF) << 16) | ((buffer[bufferPosition++] & 0xFF) << 8) | (buffer[bufferPosition++] & 0xFF);
     } else {
       return super.readInt();
     }
   }
-  
+
   @Override
   public long readLong() throws IOException {
-    if (8 <= (bufferLength-bufferPosition)) {
-      final int i1 = ((buffer[bufferPosition++] & 0xff) << 24) | ((buffer[bufferPosition++] & 0xff) << 16) |
-        ((buffer[bufferPosition++] & 0xff) << 8) | (buffer[bufferPosition++] & 0xff);
-      final int i2 = ((buffer[bufferPosition++] & 0xff) << 24) | ((buffer[bufferPosition++] & 0xff) << 16) |
-        ((buffer[bufferPosition++] & 0xff) << 8) | (buffer[bufferPosition++] & 0xff);
-      return (((long)i1) << 32) | (i2 & 0xFFFFFFFFL);
+    if (8 <= (bufferLength - bufferPosition)) {
+      final int i1 = ((buffer[bufferPosition++] & 0xff) << 24) | ((buffer[bufferPosition++] & 0xff) << 16) | ((buffer[bufferPosition++] & 0xff) << 8)
+          | (buffer[bufferPosition++] & 0xff);
+      final int i2 = ((buffer[bufferPosition++] & 0xff) << 24) | ((buffer[bufferPosition++] & 0xff) << 16) | ((buffer[bufferPosition++] & 0xff) << 8)
+          | (buffer[bufferPosition++] & 0xff);
+      return (((long) i1) << 32) | (i2 & 0xFFFFFFFFL);
     } else {
       return super.readLong();
     }
@@ -136,7 +135,7 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
 
   @Override
   public int readVInt() throws IOException {
-    if (5 <= (bufferLength-bufferPosition)) {
+    if (5 <= (bufferLength - bufferPosition)) {
       byte b = buffer[bufferPosition++];
       int i = b & 0x7F;
       for (int shift = 7; (b & 0x80) != 0; shift += 7) {
@@ -148,10 +147,10 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
       return super.readVInt();
     }
   }
-  
+
   @Override
   public long readVLong() throws IOException {
-    if (9 <= bufferLength-bufferPosition) {
+    if (9 <= bufferLength - bufferPosition) {
       byte b = buffer[bufferPosition++];
       long i = b & 0x7F;
       for (int shift = 7; (b & 0x80) != 0; shift += 7) {
@@ -163,13 +162,13 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
       return super.readVLong();
     }
   }
-  
+
   private void refill() throws IOException {
     long start = bufferStart + bufferPosition;
     long end = start + bufferSize;
-    if (end > length())				  // don't read past EOF
+    if (end > length()) // don't read past EOF
       end = length();
-    int newLength = (int)(end - start);
+    int newLength = (int) (end - start);
     if (newLength <= 0)
       throw new IOException("read past EOF");
 
@@ -182,49 +181,57 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
     bufferStart = start;
     bufferPosition = 0;
   }
-  
+
   @Override
   public final void close() throws IOException {
     closeInternal();
     BufferStore.putBuffer(buffer);
     buffer = null;
   }
-  
+
   protected abstract void closeInternal() throws IOException;
 
-  /** Expert: implements buffer refill.  Reads bytes from the current position
-   * in the input.
-   * @param b the array to read bytes into
-   * @param offset the offset in the array to start storing bytes
-   * @param length the number of bytes to read
+  /**
+   * Expert: implements buffer refill. Reads bytes from the current position in
+   * the input.
+   * 
+   * @param b
+   *          the array to read bytes into
+   * @param offset
+   *          the offset in the array to start storing bytes
+   * @param length
+   *          the number of bytes to read
    */
-  protected abstract void readInternal(byte[] b, int offset, int length)
-          throws IOException;
+  protected abstract void readInternal(byte[] b, int offset, int length) throws IOException;
 
   @Override
-  public long getFilePointer() { return bufferStart + bufferPosition; }
+  public long getFilePointer() {
+    return bufferStart + bufferPosition;
+  }
 
   @Override
   public void seek(long pos) throws IOException {
     if (pos >= bufferStart && pos < (bufferStart + bufferLength))
-      bufferPosition = (int)(pos - bufferStart);  // seek within buffer
+      bufferPosition = (int) (pos - bufferStart); // seek within buffer
     else {
       bufferStart = pos;
       bufferPosition = 0;
-      bufferLength = 0;				  // trigger refill() on read()
+      bufferLength = 0; // trigger refill() on read()
       seekInternal(pos);
     }
   }
 
-  /** Expert: implements seek.  Sets current position in this file, where the
-   * next {@link #readInternal(byte[],int,int)} will occur.
+  /**
+   * Expert: implements seek. Sets current position in this file, where the next
+   * {@link #readInternal(byte[],int,int)} will occur.
+   * 
    * @see #readInternal(byte[],int,int)
    */
   protected abstract void seekInternal(long pos) throws IOException;
 
   @Override
   public Object clone() {
-    CustomBufferedIndexInput clone = (CustomBufferedIndexInput)super.clone();
+    CustomBufferedIndexInput clone = (CustomBufferedIndexInput) super.clone();
 
     clone.buffer = null;
     clone.bufferLength = 0;
@@ -254,10 +261,10 @@ public abstract class CustomBufferedIndexInput extends IndexInput {
     }
     return toCopy;
   }
-  
+
   @Override
   public void copyBytes(IndexOutput out, long numBytes) throws IOException {
-    assert numBytes >= 0: "numBytes=" + numBytes;
+    assert numBytes >= 0 : "numBytes=" + numBytes;
 
     while (numBytes > 0) {
       if (bufferLength == bufferPosition) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCache.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCache.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCache.java
index ecd2960..711c874 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCache.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCache.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 import java.nio.ByteBuffer;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -20,20 +36,20 @@ public class BlockCache {
   private final int _numberOfBlocksPerSlab;
   private final int _maxEntries;
   private final BlurMetrics _metrics;
-  
+
   public BlockCache(BlurMetrics metrics, boolean directAllocation, long totalMemory) {
-    this(metrics,directAllocation,totalMemory,_128M);
+    this(metrics, directAllocation, totalMemory, _128M);
   }
-  
+
   public BlockCache(BlurMetrics metrics, boolean directAllocation, long totalMemory, int slabSize) {
-    this(metrics,directAllocation,totalMemory,slabSize,_32K);
+    this(metrics, directAllocation, totalMemory, slabSize, _32K);
   }
-  
+
   public BlockCache(BlurMetrics metrics, boolean directAllocation, long totalMemory, int slabSize, int blockSize) {
     _metrics = metrics;
     _numberOfBlocksPerSlab = slabSize / blockSize;
     int numberOfSlabs = (int) (totalMemory / slabSize);
-    
+
     _slabs = new ByteBuffer[numberOfSlabs];
     _locks = new BlockLocks[numberOfSlabs];
     _lockCounters = new AtomicInteger[numberOfSlabs];

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheKey.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheKey.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheKey.java
index 5134e89..64dd703 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheKey.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheKey.java
@@ -1,70 +1,73 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 public class BlockCacheKey implements Cloneable {
 
-    private long _block;
-    private int _file;
-
-    public long getBlock() {
-        return _block;
-    }
-
-    public int getFile() {
-        return _file;
-    }
-    
-    public void setBlock(long block) {
-        _block = block;
-    }
-
-    public void setFile(int file) {
-        _file = file;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + (int) (_block ^ (_block >>> 32));
-        result = prime * result + _file;
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        BlockCacheKey other = (BlockCacheKey) obj;
-        if (_block != other._block)
-            return false;
-        if (_file != other._file)
-            return false;
-        return true;
-    }
-
-    @Override
-    public BlockCacheKey clone() {
-        try {
-            return (BlockCacheKey) super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new RuntimeException(e);
-        }
+  private long _block;
+  private int _file;
+
+  public long getBlock() {
+    return _block;
+  }
+
+  public int getFile() {
+    return _file;
+  }
+
+  public void setBlock(long block) {
+    _block = block;
+  }
+
+  public void setFile(int file) {
+    _file = file;
+  }
+
+  @Override
+  public int hashCode() {
+    final int prime = 31;
+    int result = 1;
+    result = prime * result + (int) (_block ^ (_block >>> 32));
+    result = prime * result + _file;
+    return result;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj)
+      return true;
+    if (obj == null)
+      return false;
+    if (getClass() != obj.getClass())
+      return false;
+    BlockCacheKey other = (BlockCacheKey) obj;
+    if (_block != other._block)
+      return false;
+    if (_file != other._file)
+      return false;
+    return true;
+  }
+
+  @Override
+  public BlockCacheKey clone() {
+    try {
+      return (BlockCacheKey) super.clone();
+    } catch (CloneNotSupportedException e) {
+      throw new RuntimeException(e);
     }
+  }
 }
-
-
-
-
-
-
-
-
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheLocation.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheLocation.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheLocation.java
index b394894..2f5c3fd 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheLocation.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockCacheLocation.java
@@ -1,51 +1,66 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 import java.util.concurrent.atomic.AtomicBoolean;
 
-
 public class BlockCacheLocation {
 
-    private int _block;
-    private int _slabId;
-    private long _lastAccess = System.currentTimeMillis();
-    private long _accesses;
-    private AtomicBoolean _removed = new AtomicBoolean(false);
-    
-    public void setBlock(int block) {
-        _block = block;
-    }
-
-    public void setSlabId(int slabId) {
-        _slabId = slabId;
-    }
-
-    public int getBlock() {
-        return _block;
-    }
-
-    public int getSlabId() {
-        return _slabId;
-    }
-
-    public void touch() {
-        _lastAccess = System.currentTimeMillis();
-        _accesses++;
-    }
-    
-    public long getLastAccess() {
-        return _lastAccess;
-    }
-
-    public long getNumberOfAccesses() {
-        return _accesses;
-    }
-
-    public boolean isRemoved() {
-      return _removed.get();
-    }
-
-    public void setRemoved(boolean removed) {
-      _removed.set(removed);
-    }
+  private int _block;
+  private int _slabId;
+  private long _lastAccess = System.currentTimeMillis();
+  private long _accesses;
+  private AtomicBoolean _removed = new AtomicBoolean(false);
+
+  public void setBlock(int block) {
+    _block = block;
+  }
+
+  public void setSlabId(int slabId) {
+    _slabId = slabId;
+  }
+
+  public int getBlock() {
+    return _block;
+  }
+
+  public int getSlabId() {
+    return _slabId;
+  }
+
+  public void touch() {
+    _lastAccess = System.currentTimeMillis();
+    _accesses++;
+  }
+
+  public long getLastAccess() {
+    return _lastAccess;
+  }
+
+  public long getNumberOfAccesses() {
+    return _accesses;
+  }
+
+  public boolean isRemoved() {
+    return _removed.get();
+  }
+
+  public void setRemoved(boolean removed) {
+    _removed.set(removed);
+  }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectory.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectory.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectory.java
index d86d229..314db09 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectory.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectory.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Set;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryCache.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryCache.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryCache.java
index 22f2e23..5f0e297 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryCache.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryCache.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -9,19 +25,19 @@ import com.nearinfinity.blur.metrics.BlurMetrics;
 public class BlockDirectoryCache implements Cache {
   private BlockCache _blockCache;
   private AtomicInteger _counter = new AtomicInteger();
-  private Map<String,Integer> _names = new ConcurrentHashMap<String, Integer>();
+  private Map<String, Integer> _names = new ConcurrentHashMap<String, Integer>();
   private BlurMetrics _blurMetrics;
-  
+
   public BlockDirectoryCache(BlockCache blockCache, BlurMetrics blurMetrics) {
     _blockCache = blockCache;
     _blurMetrics = blurMetrics;
   }
-  
+
   @Override
   public void delete(String name) {
     _names.remove(name);
   }
-  
+
   @Override
   public void update(String name, long blockId, byte[] buffer) {
     Integer file = _names.get(name);
@@ -32,7 +48,7 @@ public class BlockDirectoryCache implements Cache {
     BlockCacheKey blockCacheKey = new BlockCacheKey();
     blockCacheKey.setBlock(blockId);
     blockCacheKey.setFile(file);
-    _blockCache.store(blockCacheKey, buffer);  
+    _blockCache.store(blockCacheKey, buffer);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockLocks.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockLocks.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockLocks.java
index 053ecf1..d02685f 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockLocks.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/BlockLocks.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 import java.util.concurrent.atomic.AtomicLongArray;
 
 import org.apache.lucene.util.BitUtil;
@@ -18,6 +34,7 @@ public class BlockLocks {
 
   /**
    * Find the next clear bit in the bit set.
+   * 
    * @param index
    * @return
    */
@@ -41,8 +58,11 @@ public class BlockLocks {
   }
 
   /**
-   * Thread safe set operation that will set the bit if and only if the bit was not previously set.
-   * @param index the index position to set.
+   * Thread safe set operation that will set the bit if and only if the bit was
+   * not previously set.
+   * 
+   * @param index
+   *          the index position to set.
    * @return returns true if the bit was set and false if it was already set.
    */
   public boolean set(int index) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/Cache.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/Cache.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/Cache.java
index a68f09b..cab4b3f 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/Cache.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/blockcache/Cache.java
@@ -1,10 +1,29 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 public interface Cache {
 
   void delete(String name);
+
   void update(String name, long blockId, byte[] buffer);
+
   boolean fetch(String name, long blockId, int blockOffset, byte[] b, int off, int lengthToReadInBlock);
+
   long size();
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectory.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectory.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectory.java
index 503d018..634da0f 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectory.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectory.java
@@ -1,11 +1,14 @@
-/*
- * Copyright (C) 2011 Near Infinity Corporation
- *
- * Licensed 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
+package com.nearinfinity.blur.store.compressed;
+
+/**
+ * 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
+ *     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,
@@ -13,9 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-package com.nearinfinity.blur.store.compressed;
-
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLongArray;
@@ -249,8 +249,7 @@ public class CompressedFieldDataDirectory extends Directory {
     private int _blockCount;
     private Compressor _compressor;
 
-    public CompressedIndexOutput_V1(String name, Directory directory, CompressionCodec codec, int blockSize)
-        throws IOException {
+    public CompressedIndexOutput_V1(String name, Directory directory, CompressionCodec codec, int blockSize) throws IOException {
       _compressor = codec.createCompressor();
       if (_compressor == null) {
         throw new RuntimeException("CompressionCodec [" + codec + "] does not support compressor on this platform.");
@@ -369,8 +368,7 @@ public class CompressedFieldDataDirectory extends Directory {
     private int _blockCount;
     private Compressor _compressor;
 
-    public CompressedIndexOutput_V0(String name, Directory directory, CompressionCodec codec, int blockSize)
-        throws IOException {
+    public CompressedIndexOutput_V0(String name, Directory directory, CompressionCodec codec, int blockSize) throws IOException {
       _compressor = codec.createCompressor();
       if (_compressor == null) {
         throw new RuntimeException("CompressionCodec [" + codec + "] does not support compressor on this platform.");

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ChangeFileExt.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ChangeFileExt.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ChangeFileExt.java
index dd38fa2..4050107 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ChangeFileExt.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ChangeFileExt.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.hdfs;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 
 import org.apache.hadoop.conf.Configuration;
@@ -18,5 +34,5 @@ public class ChangeFileExt {
       fileSystem.rename(path, new Path(path.toString() + ".lf"));
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ConvertDirectory.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ConvertDirectory.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ConvertDirectory.java
index ab6acf7..2773a6a 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ConvertDirectory.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/ConvertDirectory.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.hdfs;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 
 import org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/CopyFromHdfsLocal.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/CopyFromHdfsLocal.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/CopyFromHdfsLocal.java
index d29c6b4..c413d46 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/CopyFromHdfsLocal.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/CopyFromHdfsLocal.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.hdfs;
 
+/**
+ * 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.
+ */
 import java.io.File;
 import java.io.IOException;
 
@@ -15,14 +31,14 @@ public class CopyFromHdfsLocal {
   public static void main(String[] args) throws IOException {
     Path path = new Path(args[0]);
     HdfsDirectory src = new HdfsDirectory(path);
-    
+
     for (String name : src.listAll()) {
       System.out.println(name);
     }
-    
+
     CompressedFieldDataDirectory compressedDirectory = new CompressedFieldDataDirectory(src, new DefaultCodec(), 32768);
     Directory dest = FSDirectory.open(new File(args[1]));
-    
+
     for (String name : compressedDirectory.listAll()) {
       compressedDirectory.copy(dest, name, name);
     }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsDirectory.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsDirectory.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsDirectory.java
index 114d9e1..5d7bfae 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsDirectory.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsDirectory.java
@@ -1,11 +1,14 @@
-/*
- * Copyright (C) 2011 Near Infinity Corporation
- *
- * Licensed 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
+package com.nearinfinity.blur.store.hdfs;
+
+/**
+ * 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
+ *     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,
@@ -13,9 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-package com.nearinfinity.blur.store.hdfs;
-
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -35,7 +35,7 @@ import org.apache.lucene.store.IndexOutput;
 import com.nearinfinity.blur.store.CustomBufferedIndexInput;
 
 public class HdfsDirectory extends Directory {
-  
+
   public static final int BUFFER_SIZE = 8192;
 
   private static final String LF_EXT = ".lf";

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileReader.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileReader.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileReader.java
index bdbe653..9b21cc1 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileReader.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileReader.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.hdfs;
 
+/**
+ * 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.
+ */
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileWriter.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileWriter.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileWriter.java
index 27e6073..3664ff1 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileWriter.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsFileWriter.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.hdfs;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -18,12 +34,12 @@ public class HdfsFileWriter extends DataOutput {
   private List<HdfsMetaBlock> _blocks = new ArrayList<HdfsMetaBlock>();
   private long _length;
   private long _currentPosition;
-  
+
   public HdfsFileWriter(FileSystem fileSystem, Path path) throws IOException {
     _outputStream = fileSystem.create(path);
     seek(0);
   }
-  
+
   public long length() {
     return _length;
   }
@@ -66,8 +82,8 @@ public class HdfsFileWriter extends DataOutput {
   @Override
   public void writeBytes(byte[] b, int offset, int length) throws IOException {
     _outputStream.write(b, offset, length);
-    _block.length+=length;
-    _currentPosition+=length;
+    _block.length += length;
+    _currentPosition += length;
     updateLength();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsMetaBlock.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsMetaBlock.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsMetaBlock.java
index 3eb7420..4905ed4 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsMetaBlock.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/HdfsMetaBlock.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.hdfs;
 
+/**
+ * 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.
+ */
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/NullIndexOutput.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/NullIndexOutput.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/NullIndexOutput.java
index 465ebb2..9ad6147 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/NullIndexOutput.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/hdfs/NullIndexOutput.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.hdfs;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 
 import org.apache.lucene.store.IndexOutput;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/com/nearinfinity/blur/store/lock/BlurLockFactory.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/com/nearinfinity/blur/store/lock/BlurLockFactory.java b/src/blur-store/src/main/java/com/nearinfinity/blur/store/lock/BlurLockFactory.java
index a5b7241..d2a3141 100644
--- a/src/blur-store/src/main/java/com/nearinfinity/blur/store/lock/BlurLockFactory.java
+++ b/src/blur-store/src/main/java/com/nearinfinity/blur/store/lock/BlurLockFactory.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.lock;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 import java.util.Arrays;
 
@@ -32,6 +48,7 @@ public class BlurLockFactory extends LockFactory {
     final Path lockPath = new Path(_dir, lockName);
     return new Lock() {
       private boolean _set;
+
       @Override
       public boolean obtain() throws IOException {
         if (_set) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBounds.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBounds.java b/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBounds.java
index 1fa099e..e8e9dca 100644
--- a/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBounds.java
+++ b/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBounds.java
@@ -1,5 +1,21 @@
 package org.apache.lucene.index;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -19,7 +35,6 @@ import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.ReaderUtil;
-import org.apache.lucene.util.Version;
 
 import com.nearinfinity.blur.log.Log;
 import com.nearinfinity.blur.log.LogFactory;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBoundsStatus.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBoundsStatus.java b/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBoundsStatus.java
index db47213..d327796 100644
--- a/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBoundsStatus.java
+++ b/src/blur-store/src/main/java/org/apache/lucene/index/WarmUpByFieldBoundsStatus.java
@@ -1,5 +1,21 @@
 package org.apache.lucene.index;
 
+/**
+ * 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.
+ */
 import java.util.concurrent.atomic.AtomicBoolean;
 
 public interface WarmUpByFieldBoundsStatus {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectory.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectory.java b/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectory.java
index 93eda49..d8ecbe1 100644
--- a/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectory.java
+++ b/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectory.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectoryNrt.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectoryNrt.java b/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectoryNrt.java
index ad1923d..d713cda 100644
--- a/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectoryNrt.java
+++ b/src/blur-store/src/test/java/com/nearinfinity/blur/store/BenchmarkDirectoryNrt.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store;
 
+/**
+ * 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.
+ */
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/test/java/com/nearinfinity/blur/store/HdfsDirectoryTest.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/test/java/com/nearinfinity/blur/store/HdfsDirectoryTest.java b/src/blur-store/src/test/java/com/nearinfinity/blur/store/HdfsDirectoryTest.java
index f326785..1a03156 100644
--- a/src/blur-store/src/test/java/com/nearinfinity/blur/store/HdfsDirectoryTest.java
+++ b/src/blur-store/src/test/java/com/nearinfinity/blur/store/HdfsDirectoryTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store;
 
+/**
+ * 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.
+ */
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -23,7 +39,7 @@ import org.junit.Test;
 import com.nearinfinity.blur.store.hdfs.HdfsDirectory;
 
 public class HdfsDirectoryTest {
-  
+
   private static final int MAX_NUMBER_OF_WRITES = 10000;
   private static final int MIN_FILE_SIZE = 100;
   private static final int MAX_FILE_SIZE = 100000;
@@ -39,17 +55,17 @@ public class HdfsDirectoryTest {
   public void setUp() throws IOException {
     file = new File("./tmp");
     rm(file);
-    URI uri = new File(file,"hdfs").toURI();
+    URI uri = new File(file, "hdfs").toURI();
     Path hdfsDirPath = new Path(uri.toString());
     directory = new HdfsDirectory(hdfsDirPath);
     seed = new Random().nextLong();
-//    seed = 7392202912208392081L;
+    // seed = 7392202912208392081L;
     random = new Random(seed);
   }
-  
+
   @Test
   public void testWritingAndReadingAFile() throws IOException {
-    
+
     IndexOutput output = directory.createOutput("testing.test");
     output.writeInt(12345);
     output.flush();
@@ -79,7 +95,7 @@ public class HdfsDirectoryTest {
     directory.deleteFile("testing.test");
     assertFalse(directory.fileExists("testing.test"));
   }
-  
+
   @Test
   public void testEOF() throws IOException {
     Directory fsDir = new RAMDirectory();
@@ -88,8 +104,8 @@ public class HdfsDirectoryTest {
     long fsLength = fsDir.fileLength(name);
     long hdfsLength = directory.fileLength(name);
     assertEquals(fsLength, hdfsLength);
-    testEof(name,fsDir,fsLength);
-    testEof(name,directory,hdfsLength);
+    testEof(name, fsDir, fsLength);
+    testEof(name, directory, hdfsLength);
   }
 
   private void testEof(String name, Directory directory, long length) throws IOException {
@@ -107,13 +123,13 @@ public class HdfsDirectoryTest {
     int i = 0;
     try {
       Set<String> names = new HashSet<String>();
-      for (; i< 10; i++) {
+      for (; i < 10; i++) {
         Directory fsDir = new RAMDirectory();
         String name = getName();
-        System.out.println("Working on pass [" + i  +"] seed [" + seed + "] contains [" + names.contains(name) + "]");
+        System.out.println("Working on pass [" + i + "] seed [" + seed + "] contains [" + names.contains(name) + "]");
         names.add(name);
-        createFile(name,fsDir,directory);
-        assertInputsEquals(name,fsDir,directory);
+        createFile(name, fsDir, directory);
+        assertInputsEquals(name, fsDir, directory);
         fsDir.close();
       }
     } catch (Exception e) {
@@ -125,12 +141,12 @@ public class HdfsDirectoryTest {
   private void assertInputsEquals(String name, Directory fsDir, HdfsDirectory hdfs) throws IOException {
     int reads = random.nextInt(MAX_NUMBER_OF_READS);
     int buffer = random.nextInt(MAX_BUFFER_SIZE - MIN_BUFFER_SIZE) + MIN_BUFFER_SIZE;
-    IndexInput fsInput = fsDir.openInput(name,buffer);
-    IndexInput hdfsInput = hdfs.openInput(name,buffer);
+    IndexInput fsInput = fsDir.openInput(name, buffer);
+    IndexInput hdfsInput = hdfs.openInput(name, buffer);
     assertEquals(fsInput.length(), hdfsInput.length());
     int fileLength = (int) fsInput.length();
     for (int i = 0; i < reads; i++) {
-      byte[] fsBuf = new byte[random.nextInt(Math.min(MAX_BUFFER_SIZE - MIN_BUFFER_SIZE,fileLength)) + MIN_BUFFER_SIZE];
+      byte[] fsBuf = new byte[random.nextInt(Math.min(MAX_BUFFER_SIZE - MIN_BUFFER_SIZE, fileLength)) + MIN_BUFFER_SIZE];
       byte[] hdfsBuf = new byte[fsBuf.length];
       int offset = random.nextInt(fsBuf.length);
       int length = random.nextInt(fsBuf.length - offset);
@@ -157,7 +173,7 @@ public class HdfsDirectoryTest {
     IndexOutput hdfsOutput = hdfs.createOutput(name);
     hdfsOutput.setLength(fileLength);
     for (int i = 0; i < writes; i++) {
-      byte[] buf = new byte[random.nextInt(Math.min(MAX_BUFFER_SIZE - MIN_BUFFER_SIZE,fileLength)) + MIN_BUFFER_SIZE];
+      byte[] buf = new byte[random.nextInt(Math.min(MAX_BUFFER_SIZE - MIN_BUFFER_SIZE, fileLength)) + MIN_BUFFER_SIZE];
       random.nextBytes(buf);
       int offset = random.nextInt(buf.length);
       int length = random.nextInt(buf.length - offset);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/test/java/com/nearinfinity/blur/store/UsingHdfsDir.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/test/java/com/nearinfinity/blur/store/UsingHdfsDir.java b/src/blur-store/src/test/java/com/nearinfinity/blur/store/UsingHdfsDir.java
index d828a79..7cbfc57 100644
--- a/src/blur-store/src/test/java/com/nearinfinity/blur/store/UsingHdfsDir.java
+++ b/src/blur-store/src/test/java/com/nearinfinity/blur/store/UsingHdfsDir.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store;
 
+/**
+ * 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.
+ */
 import static com.nearinfinity.blur.lucene.LuceneConstant.LUCENE_VERSION;
 
 import java.io.IOException;
@@ -29,39 +45,40 @@ import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.store.NoLockFactory;
 
 import com.nearinfinity.blur.store.hdfs.HdfsDirectory;
+
 public class UsingHdfsDir {
 
   public static void main(String[] args) throws IOException {
-    
-//    FileSystem fs = FileSystem.getLocal(new Configuration());
-//    Path p = new Path("file:///tmp/testdir");
-    
+
+    // FileSystem fs = FileSystem.getLocal(new Configuration());
+    // Path p = new Path("file:///tmp/testdir");
+
     Path p = new Path("hdfs://localhost:9000/test-dir");
-    FileSystem fs = FileSystem.get(p.toUri(),new Configuration());
+    FileSystem fs = FileSystem.get(p.toUri(), new Configuration());
     fs.delete(p, true);
-    
+
     final HdfsDirectory directory = new HdfsDirectory(p);
     directory.setLockFactory(NoLockFactory.getNoLockFactory());
-    
+
     IndexWriter writer = new IndexWriter(directory, new IndexWriterConfig(LUCENE_VERSION, new StandardAnalyzer(LUCENE_VERSION)));
     for (int i = 0; i < 100000; i++) {
       writer.addDocument(getDoc());
     }
     writer.close();
-    
+
     IndexReader reader = IndexReader.open(directory);
     TermEnum terms = reader.terms();
     while (terms.next()) {
       System.out.println(terms.term());
     }
     terms.close();
-    
+
     IndexSearcher searcher = new IndexSearcher(reader);
-    TopDocs topDocs = searcher.search(new TermQuery(new Term("name","ffff")), 10);
+    TopDocs topDocs = searcher.search(new TermQuery(new Term("name", "ffff")), 10);
     System.out.println(topDocs.totalHits);
-    
+
     reader.close();
-    
+
     List<String> files = new ArrayList<String>(Arrays.asList(directory.listAll()));
     Collections.sort(files, new Comparator<String>() {
       @Override
@@ -78,17 +95,17 @@ public class UsingHdfsDir {
         }
       }
     });
-    
+
     for (String file : files) {
       System.out.println(file + " " + directory.fileLength(file));
     }
-    
+
     directory.close();
   }
 
   private static Document getDoc() {
     Document document = new Document();
-    document.add(new Field("name",UUID.randomUUID().toString(),Store.YES,Index.ANALYZED_NO_NORMS));
+    document.add(new Field("name", UUID.randomUUID().toString(), Store.YES, Index.ANALYZED_NO_NORMS));
     return document;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockCacheTest.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockCacheTest.java b/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockCacheTest.java
index 2e5cd9e..13f8260 100644
--- a/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockCacheTest.java
+++ b/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockCacheTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 import static org.junit.Assert.assertTrue;
 
 import java.util.Arrays;
@@ -16,11 +32,11 @@ public class BlockCacheTest {
   public void testBlockCache() {
     int blocksInTest = 2000000;
     int blockSize = 1024;
-    
+
     int slabSize = blockSize * 4096;
     long totalMemory = 2 * slabSize;
-    
-    BlockCache blockCache = new BlockCache(new BlurMetrics(new Configuration()), true,totalMemory,slabSize,blockSize);
+
+    BlockCache blockCache = new BlockCache(new BlurMetrics(new Configuration()), true, totalMemory, slabSize, blockSize);
     byte[] buffer = new byte[1024];
     Random random = new Random();
     byte[] newData = new byte[blockSize];

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryTest.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryTest.java b/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryTest.java
index 8a65968..79980c0 100644
--- a/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryTest.java
+++ b/src/blur-store/src/test/java/com/nearinfinity/blur/store/blockcache/BlockDirectoryTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.blockcache;
 
+/**
+ * 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.
+ */
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/283c6a45/src/blur-store/src/test/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectoryTest.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/test/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectoryTest.java b/src/blur-store/src/test/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectoryTest.java
index 60a23f9..bfdc4e4 100644
--- a/src/blur-store/src/test/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectoryTest.java
+++ b/src/blur-store/src/test/java/com/nearinfinity/blur/store/compressed/CompressedFieldDataDirectoryTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.store.compressed;
 
+/**
+ * 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.
+ */
 import static com.nearinfinity.blur.lucene.LuceneConstant.LUCENE_VERSION;
 import static org.junit.Assert.assertEquals;
 


Mime
View raw message