Permalink
Browse files

Rename scrunch packages and add license headers

Signed-off-by: Josh Wills <jwills@cloudera.com>
  • Loading branch information...
1 parent 5accc9a commit 540345ca226d37cfe7a8e2a8989e3ab4e21cde4a @jwills jwills committed Jul 7, 2012
Showing with 595 additions and 520 deletions.
  1. +1 −1 scrunch/build.sbt
  2. +1 −1 scrunch/pom.xml
  3. +0 −38 scrunch/src/main/java/com/cloudera/scrunch/ScalaReflectDataFactory.java
  4. +41 −0 scrunch/src/main/java/org/apache/scrunch/ScalaReflectDataFactory.java
  5. +13 −10 scrunch/src/main/java/{com/cloudera → org/apache}/scrunch/ScalaSafeReflectData.java
  6. +13 −10 scrunch/src/main/java/{com/cloudera → org/apache}/scrunch/ScalaSafeReflectDatumReader.java
  7. +13 −10 scrunch/src/main/java/{com/cloudera → org/apache}/scrunch/ScalaSafeReflectDatumWriter.java
  8. +0 −40 scrunch/src/main/scala/com/cloudera/scrunch/IO.scala
  9. +0 −45 scrunch/src/main/scala/com/cloudera/scrunch/PCollectionLike.scala
  10. +16 −13 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/Conversions.scala
  11. +13 −10 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/EmbeddedPipeline.scala
  12. +20 −17 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/EmbeddedPipelineLike.scala
  13. +43 −0 scrunch/src/main/scala/org/apache/scrunch/IO.scala
  14. +17 −14 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/Mem.scala
  15. +17 −14 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/PCollection.scala
  16. +48 −0 scrunch/src/main/scala/org/apache/scrunch/PCollectionLike.scala
  17. +15 −12 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/PGroupedTable.scala
  18. +16 −13 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/PTable.scala
  19. +17 −14 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/PTypeFamily.scala
  20. +21 −18 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/Pipeline.scala
  21. +14 −11 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/PipelineApp.scala
  22. +13 −10 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/PipelineHelper.scala
  23. +19 −16 scrunch/src/main/scala/{com/cloudera → org/apache}/scrunch/PipelineLike.scala
  24. +0 −39 scrunch/src/test/scala/com/cloudera/scrunch/CogroupTest.scala
  25. +0 −43 scrunch/src/test/scala/com/cloudera/scrunch/JoinTest.scala
  26. +0 −39 scrunch/src/test/scala/com/cloudera/scrunch/TopTest.scala
  27. +0 −42 scrunch/src/test/scala/com/cloudera/scrunch/WordCountTest.scala
  28. +42 −0 scrunch/src/test/scala/org/apache/scrunch/CogroupTest.scala
  29. +46 −0 scrunch/src/test/scala/org/apache/scrunch/JoinTest.scala
  30. +16 −13 scrunch/src/test/scala/{com/cloudera → org/apache}/scrunch/PageRankClassTest.scala
  31. +16 −13 scrunch/src/test/scala/{com/cloudera → org/apache}/scrunch/PageRankTest.scala
  32. +2 −2 scrunch/src/test/scala/{com/cloudera → org/apache}/scrunch/PipelineAppTest.scala
  33. +42 −0 scrunch/src/test/scala/org/apache/scrunch/TopTest.scala
  34. +15 −12 scrunch/src/test/scala/{com/cloudera → org/apache}/scrunch/UnionTest.scala
  35. +45 −0 scrunch/src/test/scala/org/apache/scrunch/WordCountTest.scala
View
@@ -10,7 +10,7 @@ resolvers ++= Seq(
)
libraryDependencies ++= Seq(
- "com.cloudera.crunch" % "crunch" % "0.3.0" excludeAll(
+ "org.apache.crunch" % "crunch" % "0.3.0" excludeAll(
ExclusionRule(organization = "com.sun.jdmk"),
ExclusionRule(organization = "com.sun.jmx"),
ExclusionRule(organization = "javax.jms")
View
@@ -25,7 +25,7 @@
<version>2.9.2</version>
</dependency>
<dependency>
- <groupId>com.cloudera.crunch</groupId>
+ <groupId>org.apache.crunch</groupId>
<artifactId>crunch</artifactId>
<version>0.3.0</version>
</dependency>
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2012, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
- *
- * This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for
- * the specific language governing permissions and limitations under the
- * License.
- */
-package com.cloudera.scrunch;
-
-import org.apache.avro.Schema;
-import org.apache.avro.reflect.ReflectData;
-import org.apache.avro.reflect.ReflectDatumReader;
-import org.apache.avro.reflect.ReflectDatumWriter;
-
-import com.cloudera.crunch.types.avro.ReflectDataFactory;
-
-/**
- * An implementation of the {@code ReflectDataFactory} class to work with Scala classes.
- */
-public class ScalaReflectDataFactory extends ReflectDataFactory {
-
- public ReflectData getReflectData() { return ScalaSafeReflectData.get(); }
-
- public <T> ReflectDatumReader<T> getReader(Schema schema) {
- return new ScalaSafeReflectDatumReader<T>(schema);
- }
-
- public <T> ReflectDatumWriter<T> getWriter() {
- return new ScalaSafeReflectDatumWriter<T>();
- }
-}
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.scrunch;
+
+import org.apache.avro.Schema;
+import org.apache.avro.reflect.ReflectData;
+import org.apache.avro.reflect.ReflectDatumReader;
+import org.apache.avro.reflect.ReflectDatumWriter;
+
+import org.apache.crunch.types.avro.ReflectDataFactory;
+
+/**
+ * An implementation of the {@code ReflectDataFactory} class to work with Scala classes.
+ */
+public class ScalaReflectDataFactory extends ReflectDataFactory {
+
+ public ReflectData getReflectData() { return ScalaSafeReflectData.get(); }
+
+ public <T> ReflectDatumReader<T> getReader(Schema schema) {
+ return new ScalaSafeReflectDatumReader<T>(schema);
+ }
+
+ public <T> ReflectDatumWriter<T> getWriter() {
+ return new ScalaSafeReflectDatumWriter<T>();
+ }
+}
@@ -1,18 +1,21 @@
/**
- * Copyright (c) 2012, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
+ * 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
*
- * This software 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package com.cloudera.scrunch;
+package org.apache.scrunch;
import java.lang.reflect.Field;
import java.lang.reflect.GenericArrayType;
@@ -1,18 +1,21 @@
/**
- * Copyright (c) 2012, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
+ * 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
*
- * This software 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package com.cloudera.scrunch;
+package org.apache.scrunch;
import java.io.IOException;
import java.lang.reflect.Array;
@@ -1,18 +1,21 @@
/**
- * Copyright (c) 2012, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
+ * 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
*
- * This software 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package com.cloudera.scrunch;
+package org.apache.scrunch;
import java.util.Iterator;
import java.util.Map;
@@ -1,40 +0,0 @@
-/**
- * Copyright (c) 2012, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
- *
- * This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for
- * the specific language governing permissions and limitations under the
- * License.
- */
-package com.cloudera.scrunch
-
-import com.cloudera.crunch.io.{From => from, To => to, At => at}
-import com.cloudera.crunch.types.avro.AvroType
-import org.apache.hadoop.fs.Path;
-
-object From {
- def avroFile[T](path: String, atype: AvroType[T]) = from.avroFile(path, atype)
- def avroFile[T](path: Path, atype: AvroType[T]) = from.avroFile(path, atype)
- def textFile(path: String) = from.textFile(path)
- def textFile(path: Path) = from.textFile(path)
-}
-
-object To {
- def avroFile[T](path: String) = to.avroFile(path)
- def avroFile[T](path: Path) = to.avroFile(path)
- def textFile(path: String) = to.textFile(path)
- def textFile(path: Path) = to.textFile(path)
-}
-
-object At {
- def avroFile[T](path: String, atype: AvroType[T]) = at.avroFile(path, atype)
- def avroFile[T](path: Path, atype: AvroType[T]) = at.avroFile(path, atype)
- def textFile(path: String) = at.textFile(path)
- def textFile(path: Path) = at.textFile(path)
-}
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
- *
- * This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for
- * the specific language governing permissions and limitations under the
- * License.
- */
-package com.cloudera.scrunch
-
-import com.cloudera.crunch.DoFn
-import com.cloudera.crunch.{PCollection => JCollection, Pair => JPair, Target}
-import com.cloudera.crunch.types.{PType, PTableType}
-
-trait PCollectionLike[S, +FullType, +NativeType <: JCollection[S]] {
- val native: NativeType
-
- def wrap(newNative: AnyRef): FullType
-
- def write(target: Target): FullType = wrap(native.write(target))
-
- def parallelDo[T](fn: DoFn[S, T], ptype: PType[T]) = {
- new PCollection[T](native.parallelDo(fn, ptype))
- }
-
- def parallelDo[T](name: String, fn: DoFn[S,T], ptype: PType[T]) = {
- new PCollection[T](native.parallelDo(name, fn, ptype))
- }
-
- def parallelDo[K, V](fn: DoFn[S, JPair[K, V]], ptype: PTableType[K, V]) = {
- new PTable[K, V](native.parallelDo(fn, ptype))
- }
-
- def parallelDo[K, V](name: String, fn: DoFn[S, JPair[K, V]], ptype: PTableType[K, V]) = {
- new PTable[K, V](native.parallelDo(name, fn, ptype))
- }
-
- def getTypeFamily() = Avros
-}
@@ -1,22 +1,25 @@
/**
- * Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
+ * 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
*
- * This software 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package com.cloudera.scrunch
+package org.apache.scrunch
-import com.cloudera.crunch.{PCollection => JCollection, PGroupedTable => JGroupedTable, PTable => JTable, DoFn, Emitter}
-import com.cloudera.crunch.{Pair => CPair}
-import com.cloudera.crunch.types.PType
+import org.apache.crunch.{PCollection => JCollection, PGroupedTable => JGroupedTable, PTable => JTable, DoFn, Emitter}
+import org.apache.crunch.{Pair => CPair}
+import org.apache.crunch.types.PType
import java.nio.ByteBuffer
import scala.collection.Iterable
@@ -1,18 +1,21 @@
/**
- * Copyright (c) 2012, Cloudera, Inc. All Rights Reserved.
- *
- * Cloudera, Inc. 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
+ * 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
*
- * This software 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package com.cloudera.scrunch
+package org.apache.scrunch
import org.apache.hadoop.conf.Configuration
Oops, something went wrong.

0 comments on commit 540345c

Please sign in to comment.