Skip to content

Commit

Permalink
Update examples for API changes.
Browse files Browse the repository at this point in the history
Update PageRank and WordCount examples for changes in the API,
specifically the change to ScoobiApp and the introduction of DObject.

Also remove all other examples as they have been ported to be acceptance
test specs.
  • Loading branch information
blever authored and espringe committed May 31, 2012
1 parent 7dafbb9 commit c1fb514
Show file tree
Hide file tree
Showing 22 changed files with 74 additions and 737 deletions.
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -27,7 +27,7 @@ To use the sbt-scoobi plugin we need to include a `project/project/scoobi.scala`
}
```

And, we can add a pretty standard `build.sbt` that has a dependency on Scoobi:
And, we can add a `build.sbt` that has a dependency on Scoobi:

```scala
name := "MyApp"
Expand All @@ -38,7 +38,9 @@ And, we can add a pretty standard `build.sbt` that has a dependency on Scoobi:

libraryDependencies += "com.nicta" %% "scoobi" % "0.4.0-SNAPSHOT" % "provided"

scalacOptions += "-deprecation"
scalacOptions ++= Seq("-Ydependent-method-types", "-deprecation")

resolvers += "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
```

The `provided` is added to the `scoobi` dependency to let sbt know that Scoobi
Expand Down
7 changes: 0 additions & 7 deletions examples/averageAge/build.sbt

This file was deleted.

7 changes: 0 additions & 7 deletions examples/averageAge/project/project/build.scala

This file was deleted.

94 changes: 0 additions & 94 deletions examples/averageAge/src/main/scala/AverageAge.scala

This file was deleted.

4 changes: 3 additions & 1 deletion examples/javaWordCount/build.sbt
@@ -1,8 +1,10 @@
name := "Java Word Count"

version := "0.1"
version := "1.0"

scalaVersion := "2.9.2"

libraryDependencies += "com.nicta" %% "scoobi" % "0.4.0-SNAPSHOT" % "provided"

resolvers += "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"

18 changes: 2 additions & 16 deletions examples/javaWordCount/src/main/java/WordCount.java
Expand Up @@ -14,26 +14,12 @@
* limitations under the License.
*/
package com.nicta.scoobij.examples;
/**
* Copyright 2011 National ICT Australia Limited
*
* 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
*
* 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 com.nicta.scoobij.*;
import java.io.*;
import com.nicta.scoobij.io.text.*;


public class WordCount {

public static void main(String[] args) throws java.io.IOException {
Expand Down Expand Up @@ -88,7 +74,7 @@ public Integer apply(Integer a, Integer b) {
}, WireFormats.string(), WireFormats.integer());

// We can evalute this, and write it to a text file
Scoobi.persist(TextOutput.toTextFile(reduced, outputPath,
Scoobi.persist(TextOutput.toTextFile(reduced, outputPath, false,
WireFormats.string(), WireFormats.integer()));
}

Expand Down
7 changes: 0 additions & 7 deletions examples/joinExamples/build.sbt

This file was deleted.

7 changes: 0 additions & 7 deletions examples/joinExamples/project/project/build.scala

This file was deleted.

105 changes: 0 additions & 105 deletions examples/joinExamples/src/main/scala/JoinExamples.scala

This file was deleted.

7 changes: 0 additions & 7 deletions examples/numberPartition/build.sbt

This file was deleted.

8 changes: 0 additions & 8 deletions examples/numberPartition/project/project/build.scala

This file was deleted.

48 changes: 0 additions & 48 deletions examples/numberPartition/src/main/scala/NumberPartitioner.scala

This file was deleted.

6 changes: 5 additions & 1 deletion examples/pageRank/build.sbt
@@ -1,7 +1,11 @@
name := "PageRank"

version := "0.1"
version := "1.0"

scalaVersion := "2.9.2"

scalacOptions ++= Seq("-Ydependent-method-types", "-deprecation")

libraryDependencies += "com.nicta" %% "scoobi" % "0.4.0-SNAPSHOT" % "provided"

resolvers += "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"

0 comments on commit c1fb514

Please sign in to comment.