incubator-blur-commits mailing list archives

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


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

Branch: refs/heads/master
Commit: b274ab49b8e6b1176eff17e6d36aa2183c7183ba
Parents: 4437d31
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sun Sep 2 22:11:01 2012 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Sep 2 22:11:01 2012 -0400

----------------------------------------------------------------------
 src/blur-mapred/pom.xml                            |   19 +++++++
 .../nearinfinity/blur/mapred/BlurInputFormat.java  |   22 +++++++-
 .../nearinfinity/blur/mapred/BlurRecordReader.java |   22 +++++++-
 .../nearinfinity/blur/mapreduce/BlurColumn.java    |   33 ++++++------
 .../nearinfinity/blur/mapreduce/BlurMapper.java    |   20 ++++----
 .../nearinfinity/blur/mapreduce/BlurMutate.java    |   16 ++++++
 .../nearinfinity/blur/mapreduce/BlurRecord.java    |   20 ++++----
 .../nearinfinity/blur/mapreduce/BlurReducer.java   |   20 ++++----
 .../com/nearinfinity/blur/mapreduce/BlurTask.java  |   41 +++++++--------
 .../blur/mapreduce/BufferedDirectory.java          |   16 ++++++
 .../com/nearinfinity/blur/mapreduce/IOUtil.java    |   20 ++++----
 .../blur/mapreduce/ProgressableDirectory.java      |   16 ++++++
 .../com/nearinfinity/blur/mapreduce/SpinLock.java  |   30 ++++++++---
 .../example/BlurExampleIndexerRebuild.java         |   28 +++++-----
 .../example/BlurExampleIndexerUpdate.java          |   26 +++++-----
 .../blur/mapreduce/example/BlurExampleMapper.java  |   20 ++++----
 .../blur/mapreduce/lib/BlurInputFormat.java        |   24 +++++++--
 .../blur/mapreduce/lib/BlurInputSplit.java         |   16 ++++++
 .../blur/mapreduce/lib/BlurOutputCommitter.java    |   18 ++++++-
 .../blur/mapreduce/lib/BlurOutputFormat.java       |   22 +++++++-
 .../blur/mapreduce/lib/BlurRecordReader.java       |   20 ++++++-
 .../blur/mapreduce/lib/BlurRecordWriter.java       |   16 ++++++
 .../com/nearinfinity/blur/mapreduce/lib/Utils.java |   31 ++++++-----
 .../blur/mapred/BlurInputFormatTest.java           |   28 ++++++++--
 .../nearinfinity/blur/mapreduce/BlurTaskTest.java  |   16 ++++++
 .../blur/mapreduce/lib/BlurInputFormatTest.java    |   30 ++++++++---
 .../blur/mapreduce/lib/BlurRecordWriterTest.java   |   34 +++++++++---
 27 files changed, 452 insertions(+), 172 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/pom.xml
----------------------------------------------------------------------
diff --git a/src/blur-mapred/pom.xml b/src/blur-mapred/pom.xml
index 4bf8ebf..a4e1dd9 100644
--- a/src/blur-mapred/pom.xml
+++ b/src/blur-mapred/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/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurInputFormat.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurInputFormat.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurInputFormat.java
index b5a6905..7cee8a5 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurInputFormat.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurInputFormat.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapred;
 
+/**
+ * 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;
@@ -23,15 +39,15 @@ public class BlurInputFormat implements InputFormat<Text, BlurRecord> {
     List<?> splits = new ArrayList<Object>();
     Path[] paths = FileInputFormat.getInputPaths(job);
     for (Path path : paths) {
-      com.nearinfinity.blur.mapreduce.lib.BlurInputFormat.findAllSegments((Configuration)job,path,splits);
+      com.nearinfinity.blur.mapreduce.lib.BlurInputFormat.findAllSegments((Configuration) job, path, splits);
     }
-    return splits.toArray(new InputSplit[]{});
+    return splits.toArray(new InputSplit[] {});
   }
 
   @Override
   public RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException {
     reporter.setStatus(split.toString());
-    return new BlurRecordReader(split,job);
+    return new BlurRecordReader(split, job);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurRecordReader.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurRecordReader.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurRecordReader.java
index 3664fad..f283e54 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurRecordReader.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapred/BlurRecordReader.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapred;
 
+/**
+ * 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.fs.Path;
@@ -26,7 +42,7 @@ public class BlurRecordReader implements RecordReader<Text, BlurRecord> {
   private int startingDocId;
   private int endingDocId;
   private int position;
-  
+
   public BlurRecordReader(InputSplit split, JobConf job) throws IOException {
     BlurInputSplit blurSplit = (BlurInputSplit) split;
     Path path = blurSplit.getIndexPath();
@@ -34,9 +50,9 @@ public class BlurRecordReader implements RecordReader<Text, BlurRecord> {
     startingDocId = blurSplit.getStartingDocId();
     endingDocId = blurSplit.getEndingDocId();
     directory = new HdfsDirectory(path);
-    
+
     IndexCommit commit = Utils.findLatest(directory);
-    reader = Utils.openSegmentReader(directory, commit, segmentName,Utils.getTermInfosIndexDivisor(job));
+    reader = Utils.openSegmentReader(directory, commit, segmentName, Utils.getTermInfosIndexDivisor(job));
     int maxDoc = reader.maxDoc();
     if (endingDocId >= maxDoc) {
       endingDocId = maxDoc - 1;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurColumn.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurColumn.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurColumn.java
index 6e40922..0be0108 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurColumn.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurColumn.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.mapreduce;
+
+/**
+ * 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.mapreduce;
-
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -26,12 +26,13 @@ public class BlurColumn implements Writable {
 
   private String name;
   private String value;
-  
-  public BlurColumn(){}
-  
-  public BlurColumn(String name, String value){
-	  this.name = name;
-	  this.value = value;
+
+  public BlurColumn() {
+  }
+
+  public BlurColumn(String name, String value) {
+    this.name = name;
+    this.value = value;
   }
 
   public boolean hasNull() {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMapper.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMapper.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMapper.java
index b428d5b..6b321ee 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMapper.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMapper.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.mapreduce;
+
+/**
+ * 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.mapreduce;
-
 import java.io.IOException;
 
 import org.apache.hadoop.io.BytesWritable;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMutate.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMutate.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMutate.java
index acb800b..6c1a924 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMutate.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurMutate.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce;
 
+/**
+ * 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/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurRecord.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurRecord.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurRecord.java
index c2d0716..dc5508c 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurRecord.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurRecord.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.mapreduce;
+
+/**
+ * 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.mapreduce;
-
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurReducer.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurReducer.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurReducer.java
index 3c6975e..ad5dfad 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurReducer.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurReducer.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.mapreduce;
+
+/**
+ * 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.mapreduce;
-
 import static com.nearinfinity.blur.lucene.LuceneConstant.LUCENE_VERSION;
 import static com.nearinfinity.blur.utils.BlurConstants.RECORD_ID;
 import static com.nearinfinity.blur.utils.BlurConstants.ROW_ID;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurTask.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurTask.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurTask.java
index 3e7150f..f7f4df2 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurTask.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BlurTask.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.mapreduce;
+
+/**
+ * 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.mapreduce;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
@@ -50,15 +50,14 @@ import com.nearinfinity.blur.utils.BlurConstants;
 import com.nearinfinity.blur.utils.BlurUtil;
 
 public class BlurTask implements Writable {
-  
+
   public enum INDEXING_TYPE {
-    REBUILD,
-    UPDATE
+    REBUILD, UPDATE
   }
 
   private static final String BLUR_BLURTASK = "blur.blurtask";
   private static final Log LOG = LogFactory.getLog(BlurTask.class);
-  
+
   public static String getCounterGroupName() {
     return "Blur";
   }
@@ -82,7 +81,7 @@ public class BlurTask implements Writable {
   public static String getRowFailureCounterName() {
     return "Row Failures";
   }
-  
+
   private int _ramBufferSizeMB = 256;
   private long _maxRecordCount = Long.MAX_VALUE;
   private TableDescriptor _tableDescriptor;
@@ -120,7 +119,7 @@ public class BlurTask implements Writable {
           }
         }
       }
-      
+
       if (shardCount == 0) {
         return num;
       }
@@ -132,7 +131,7 @@ public class BlurTask implements Writable {
       throw new RuntimeException("Unable to connect to filesystem", e);
     }
   }
-  
+
   public int getRamBufferSizeMB() {
     return _ramBufferSizeMB;
   }
@@ -167,7 +166,7 @@ public class BlurTask implements Writable {
     output.close();
     String blurTask = new String(Base64.encodeBase64(os.toByteArray()));
     configuration.set(BLUR_BLURTASK, blurTask);
-    
+
     Job job = new Job(configuration, "Blur Indexer");
     job.setReducerClass(BlurReducer.class);
     job.setOutputKeyClass(BytesWritable.class);
@@ -195,10 +194,10 @@ public class BlurTask implements Writable {
     } catch (InterruptedException e) {
       throw new RuntimeException(e);
     }
-    
+
   }
 
-  public static BlurTask read(Configuration configuration) throws IOException {  
+  public static BlurTask read(Configuration configuration) throws IOException {
     byte[] blurTaskBs = Base64.decodeBase64(configuration.get(BLUR_BLURTASK));
     BlurTask blurTask = new BlurTask();
     blurTask.readFields(new DataInputStream(new ByteArrayInputStream(blurTaskBs)));
@@ -266,7 +265,7 @@ public class BlurTask implements Writable {
   }
 
   public boolean getOptimize() {
-    return _optimize;    
+    return _optimize;
   }
 
   public void setOptimize(boolean optimize) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BufferedDirectory.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BufferedDirectory.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BufferedDirectory.java
index 5a5cdce..0131996 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BufferedDirectory.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/BufferedDirectory.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce;
 
+/**
+ * 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;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/IOUtil.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/IOUtil.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/IOUtil.java
index 8c07c23..a4489d2 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/IOUtil.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/IOUtil.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.mapreduce;
+
+/**
+ * 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.mapreduce;
-
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/ProgressableDirectory.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/ProgressableDirectory.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/ProgressableDirectory.java
index 72169c3..40c1344 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/ProgressableDirectory.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/ProgressableDirectory.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce;
 
+/**
+ * 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.Map;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/SpinLock.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/SpinLock.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/SpinLock.java
index 9fa0fb2..7fdc317 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/SpinLock.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/SpinLock.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce;
 
+/**
+ * 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.Collections;
@@ -37,27 +53,27 @@ public class SpinLock {
       }
     };
     String zkConnectionStr = "localhost";
-    SpinLock lock = new SpinLock(progressable,zkConnectionStr,"test","/test-spin-lock");
+    SpinLock lock = new SpinLock(progressable, zkConnectionStr, "test", "/test-spin-lock");
     lock.copyLock(null);
   }
-  
+
   public SpinLock(Progressable progressable, String zkConnectionStr, String name, String path) throws IOException, KeeperException, InterruptedException {
     _path = path;
     _name = name;
     _progressable = progressable;
-    _zooKeeper = new ZooKeeper(zkConnectionStr,60000,new Watcher() {
+    _zooKeeper = new ZooKeeper(zkConnectionStr, 60000, new Watcher() {
       @Override
       public void process(WatchedEvent event) {
-        
+
       }
     });
     checkMaxCopies();
   }
-  
+
   private void checkMaxCopies() throws KeeperException, InterruptedException {
     Stat stat = _zooKeeper.exists(_path, false);
     if (stat == null) {
-      LOG.warn("Path [{0}] not set no limit on copies.",_path);
+      LOG.warn("Path [{0}] not set no limit on copies.", _path);
       _maxCopies = Integer.MAX_VALUE;
     } else {
       byte[] data = _zooKeeper.getData(_path, false, stat);
@@ -90,7 +106,7 @@ public class SpinLock {
     } catch (InterruptedException e) {
       throw new RuntimeException(e);
     }
-    
+
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerRebuild.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerRebuild.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerRebuild.java
index 0613746..177683f 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerRebuild.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerRebuild.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.mapreduce.example;
+
+/**
+ * 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.mapreduce.example;
-
 import java.io.IOException;
 
 import org.apache.hadoop.conf.Configuration;
@@ -36,7 +36,7 @@ import com.nearinfinity.blur.thrift.generated.ColumnDefinition;
 import com.nearinfinity.blur.thrift.generated.TableDescriptor;
 
 public class BlurExampleIndexerRebuild {
-  
+
   public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException {
     Configuration configuration = new Configuration();
     String[] otherArgs = new GenericOptionsParser(configuration, args).getRemainingArgs();
@@ -57,7 +57,7 @@ public class BlurExampleIndexerRebuild {
     descriptor.shardCount = 1;
     descriptor.cluster = "default";
     descriptor.tableUri = "./blur-testing";
-    
+
     BlurTask blurTask = new BlurTask();
     blurTask.setTableDescriptor(descriptor);
     blurTask.setIndexingType(INDEXING_TYPE.REBUILD);
@@ -67,13 +67,13 @@ public class BlurExampleIndexerRebuild {
     job.setMapperClass(BlurExampleMapper.class);
     job.setInputFormatClass(TextInputFormat.class);
     job.setOutputFormatClass(TextOutputFormat.class);
-    
+
     FileInputFormat.addInputPath(job, new Path(otherArgs[0]));
     FileOutputFormat.setOutputPath(job, new Path(otherArgs[1], "job-" + System.currentTimeMillis()));
     long s = System.currentTimeMillis();
     boolean waitForCompletion = job.waitForCompletion(true);
     long e = System.currentTimeMillis();
-    System.out.println("Completed in [" + (e-s) + " ms]");
+    System.out.println("Completed in [" + (e - s) + " ms]");
     System.exit(waitForCompletion ? 0 : 1);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerUpdate.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerUpdate.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerUpdate.java
index 3b7db1f..feb89db 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerUpdate.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleIndexerUpdate.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.mapreduce.example;
+
+/**
+ * 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.mapreduce.example;
-
 import java.io.IOException;
 
 import org.apache.hadoop.conf.Configuration;
@@ -36,7 +36,7 @@ import com.nearinfinity.blur.thrift.generated.ColumnDefinition;
 import com.nearinfinity.blur.thrift.generated.TableDescriptor;
 
 public class BlurExampleIndexerUpdate {
-  
+
   public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException {
     Configuration configuration = new Configuration();
     String[] otherArgs = new GenericOptionsParser(configuration, args).getRemainingArgs();
@@ -50,7 +50,7 @@ public class BlurExampleIndexerUpdate {
 
     ZookeeperClusterStatus status = new ZookeeperClusterStatus("localhost");
     TableDescriptor descriptor = status.getTableDescriptor(false, "default", "test-table");
-    
+
     BlurTask blurTask = new BlurTask();
     blurTask.setTableDescriptor(descriptor);
     blurTask.setIndexingType(INDEXING_TYPE.UPDATE);
@@ -59,7 +59,7 @@ public class BlurExampleIndexerUpdate {
     job.setMapperClass(BlurExampleMapper.class);
     job.setInputFormatClass(TextInputFormat.class);
     job.setOutputFormatClass(TextOutputFormat.class);
-    
+
     FileInputFormat.addInputPath(job, new Path(otherArgs[0]));
     FileOutputFormat.setOutputPath(job, new Path(otherArgs[1], "job-" + System.currentTimeMillis()));
     boolean waitForCompletion = job.waitForCompletion(true);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleMapper.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleMapper.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleMapper.java
index 9824038..aef55cb 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleMapper.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/example/BlurExampleMapper.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.mapreduce.example;
+
+/**
+ * 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.mapreduce.example;
-
 import java.io.IOException;
 import java.util.UUID;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormat.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormat.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormat.java
index 765bf0c..f8042f3 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormat.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormat.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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;
@@ -21,7 +37,7 @@ import org.apache.lucene.index.IndexReader;
 import com.nearinfinity.blur.mapreduce.BlurRecord;
 import com.nearinfinity.blur.store.hdfs.HdfsDirectory;
 
-public class BlurInputFormat extends InputFormat<Text,BlurRecord> {
+public class BlurInputFormat extends InputFormat<Text, BlurRecord> {
 
   @SuppressWarnings("unchecked")
   @Override
@@ -29,7 +45,7 @@ public class BlurInputFormat extends InputFormat<Text,BlurRecord> {
     List<?> splits = new ArrayList<Object>();
     Path[] paths = FileInputFormat.getInputPaths(context);
     for (Path path : paths) {
-      findAllSegments(context.getConfiguration(),path,splits);
+      findAllSegments(context.getConfiguration(), path, splits);
     }
     return (List<InputSplit>) splits;
   }
@@ -40,7 +56,7 @@ public class BlurInputFormat extends InputFormat<Text,BlurRecord> {
     blurRecordReader.initialize(split, context);
     return blurRecordReader;
   }
-  
+
   public static void findAllSegments(Configuration configuration, Path path, List<?> splits) throws IOException {
     FileSystem fileSystem = path.getFileSystem(configuration);
     if (fileSystem.isFile(path)) {
@@ -51,7 +67,7 @@ public class BlurInputFormat extends InputFormat<Text,BlurRecord> {
         Path p = status.getPath();
         HdfsDirectory directory = new HdfsDirectory(p);
         if (IndexReader.indexExists(directory)) {
-          addSplits(directory,splits);
+          addSplits(directory, splits);
         } else {
           findAllSegments(configuration, p, splits);
         }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputSplit.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputSplit.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputSplit.java
index cde4969..30303e3 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputSplit.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurInputSplit.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputCommitter.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputCommitter.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputCommitter.java
index 6a722ec..b9b2ed2 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputCommitter.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputCommitter.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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.mapreduce.JobContext;
@@ -9,7 +25,7 @@ import org.apache.hadoop.mapreduce.TaskAttemptContext;
 public class BlurOutputCommitter extends OutputCommitter {
 
   public BlurOutputCommitter(TaskAttemptContext context) {
-    
+
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputFormat.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputFormat.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputFormat.java
index 971e2a2..c6855fc 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputFormat.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurOutputFormat.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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.io.Text;
@@ -11,11 +27,11 @@ import org.apache.hadoop.mapreduce.TaskAttemptContext;
 
 import com.nearinfinity.blur.mapreduce.BlurRecord;
 
-public class BlurOutputFormat extends OutputFormat<Text,BlurRecord> {
-  
+public class BlurOutputFormat extends OutputFormat<Text, BlurRecord> {
+
   @Override
   public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException {
-    
+
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordReader.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordReader.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordReader.java
index f8d597c..da4cba3 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordReader.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordReader.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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.fs.Path;
@@ -35,9 +51,9 @@ public class BlurRecordReader extends RecordReader<Text, BlurRecord> {
     startingDocId = blurSplit.getStartingDocId();
     endingDocId = blurSplit.getEndingDocId();
     directory = new HdfsDirectory(path);
-    
+
     IndexCommit commit = Utils.findLatest(directory);
-    reader = Utils.openSegmentReader(directory, commit, segmentName,Utils.getTermInfosIndexDivisor(context.getConfiguration()));
+    reader = Utils.openSegmentReader(directory, commit, segmentName, Utils.getTermInfosIndexDivisor(context.getConfiguration()));
     int maxDoc = reader.maxDoc();
     if (endingDocId >= maxDoc) {
       endingDocId = maxDoc - 1;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriter.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriter.java
index 48912b2..a7997c6 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriter.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriter.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/Utils.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/Utils.java b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/Utils.java
index daf7d99..492a126 100644
--- a/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/Utils.java
+++ b/src/blur-mapred/src/main/java/com/nearinfinity/blur/mapreduce/lib/Utils.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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;
@@ -15,22 +31,11 @@ import org.apache.lucene.index.SegmentReader;
 import org.apache.lucene.store.Directory;
 
 public class Utils {
-  
-//  public static void main(String[] args) throws IOException {
-//    Directory dir = FSDirectory.open(new File("/tmp/small-multi-seg-index"));
-//    IndexCommit commit = findLatest(dir);
-//    List<String> segments = getSegments(dir,commit);
-//    for (String segment : segments) {
-//      IndexReader reader = openSegmentReader(dir, commit, segment, 128);
-//      System.out.println(segment + "=" + reader.numDocs());
-//      reader.close();
-//    }
-//  }
-  
+
   public static int getTermInfosIndexDivisor(Configuration conf) {
     return 128;
   }
-  
+
   public static IndexCommit findLatest(Directory dir) throws IOException {
     Collection<IndexCommit> listCommits = IndexReader.listCommits(dir);
     if (listCommits.size() == 1) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapred/BlurInputFormatTest.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapred/BlurInputFormatTest.java b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapred/BlurInputFormatTest.java
index a023ab6..0f5795e 100644
--- a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapred/BlurInputFormatTest.java
+++ b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapred/BlurInputFormatTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapred;
 
+/**
+ * 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 java.io.IOException;
@@ -22,16 +38,16 @@ import com.nearinfinity.blur.utils.BlurConstants;
 import com.nearinfinity.blur.utils.BlurUtil;
 
 public class BlurInputFormatTest {
-  
+
   private Path indexPath = new Path("./tmp/test-indexes/oldapi");
   private int numberOfShards = 13;
   private int rowsPerIndex = 10;
-  
+
   @Before
   public void setup() throws IOException {
-    com.nearinfinity.blur.mapreduce.lib.BlurInputFormatTest.buildTestIndexes(indexPath,numberOfShards,rowsPerIndex);
+    com.nearinfinity.blur.mapreduce.lib.BlurInputFormatTest.buildTestIndexes(indexPath, numberOfShards, rowsPerIndex);
   }
-  
+
   @Test
   public void testGetSplits() throws IOException {
     BlurInputFormat format = new BlurInputFormat();
@@ -40,12 +56,12 @@ public class BlurInputFormatTest {
     InputSplit[] splits = format.getSplits(job, -1);
     for (int i = 0; i < splits.length; i++) {
       BlurInputSplit split = (BlurInputSplit) splits[i];
-      Path path = new Path(indexPath,BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, i));
+      Path path = new Path(indexPath, BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, i));
       FileSystem fileSystem = path.getFileSystem(job);
       assertEquals(new BlurInputSplit(fileSystem.makeQualified(path), "_0", 0, Integer.MAX_VALUE), split);
     }
   }
-  
+
   @Test
   public void testGetRecordReader() throws IOException {
     BlurInputFormat format = new BlurInputFormat();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/BlurTaskTest.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/BlurTaskTest.java b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/BlurTaskTest.java
index 5d5d933..7683b7d 100644
--- a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/BlurTaskTest.java
+++ b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/BlurTaskTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce;
 
+/**
+ * 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 org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormatTest.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormatTest.java b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormatTest.java
index 74fbbca..6d03fe9 100644
--- a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormatTest.java
+++ b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurInputFormatTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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.*;
 
 import java.io.IOException;
@@ -39,23 +55,23 @@ import com.nearinfinity.blur.utils.BlurUtil;
 import com.nearinfinity.blur.utils.RowIndexWriter;
 
 public class BlurInputFormatTest {
-  
+
   private Path indexPath = new Path("./tmp/test-indexes/newapi");
   private int numberOfShards = 13;
   private int rowsPerIndex = 10;
 
   @Before
   public void setup() throws IOException {
-    buildTestIndexes(indexPath,numberOfShards,rowsPerIndex);
+    buildTestIndexes(indexPath, numberOfShards, rowsPerIndex);
   }
-  
+
   public static void buildTestIndexes(Path indexPath, int numberOfShards, int rowsPerIndex) throws IOException {
     Configuration configuration = new Configuration();
     FileSystem fileSystem = indexPath.getFileSystem(configuration);
     fileSystem.delete(indexPath, true);
     for (int i = 0; i < numberOfShards; i++) {
       String shardName = BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, i);
-      buildIndex(fileSystem,configuration, new Path(indexPath,shardName),rowsPerIndex);
+      buildIndex(fileSystem, configuration, new Path(indexPath, shardName), rowsPerIndex);
     }
   }
 
@@ -85,7 +101,7 @@ public class BlurInputFormatTest {
     Record record = new Record();
     record.setRecordId(UUID.randomUUID().toString());
     record.setFamily("cf");
-    record.addToColumns(new Column("name",UUID.randomUUID().toString()));
+    record.addToColumns(new Column("name", UUID.randomUUID().toString()));
     return record;
   }
 
@@ -100,12 +116,12 @@ public class BlurInputFormatTest {
     List<InputSplit> list = format.getSplits(context);
     for (int i = 0; i < list.size(); i++) {
       BlurInputSplit split = (BlurInputSplit) list.get(i);
-      Path path = new Path(indexPath,BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, i));
+      Path path = new Path(indexPath, BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, i));
       FileSystem fileSystem = path.getFileSystem(conf);
       assertEquals(new BlurInputSplit(fileSystem.makeQualified(path), "_0", 0, Integer.MAX_VALUE), split);
     }
   }
-  
+
   @Test
   public void testCreateRecordReader() throws IOException, InterruptedException {
     BlurInputFormat format = new BlurInputFormat();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b274ab49/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriterTest.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriterTest.java b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriterTest.java
index 2040bb3..2792900 100644
--- a/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriterTest.java
+++ b/src/blur-mapred/src/test/java/com/nearinfinity/blur/mapreduce/lib/BlurRecordWriterTest.java
@@ -1,5 +1,21 @@
 package com.nearinfinity.blur.mapreduce.lib;
 
+/**
+ * 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.*;
 
 import java.io.File;
@@ -22,7 +38,7 @@ import com.nearinfinity.blur.utils.BlurConstants;
 import com.nearinfinity.blur.utils.BlurUtil;
 
 public class BlurRecordWriterTest {
-  
+
   @Test
   public void testBlurRecordWriter() throws IOException, InterruptedException {
     JobID jobId = new JobID();
@@ -34,10 +50,10 @@ public class BlurRecordWriterTest {
     conf.set("mapred.output.dir", pathStr);
     TaskAttemptContext context = new TaskAttemptContext(conf, taskId);
     BlurRecordWriter writer = new BlurRecordWriter(context);
-    
+
     Text key = new Text();
     BlurRecord value = new BlurRecord();
-    
+
     for (int i = 0; i < 10; i++) {
       String rowId = UUID.randomUUID().toString();
       key.set(rowId);
@@ -47,15 +63,15 @@ public class BlurRecordWriterTest {
       value.addColumn("name", "value");
       writer.write(key, value);
     }
-    
+
     writer.close(context);
-    
-    //assert index exists and has document
-    
-    HdfsDirectory dir = new HdfsDirectory(new Path(pathStr,BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, 13)));
+
+    // assert index exists and has document
+
+    HdfsDirectory dir = new HdfsDirectory(new Path(pathStr, BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, 13)));
     assertTrue(IndexReader.indexExists(dir));
     IndexReader reader = IndexReader.open(dir);
-    assertEquals(10,reader.numDocs());
+    assertEquals(10, reader.numDocs());
   }
 
   private void rm(File file) {


Mime
View raw message