summaryrefslogtreecommitdiffstats
path: root/sandbox/ctrezzo/src/services
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-08-15 16:38:03 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-08-15 16:38:03 +0000
commit2732a927f48aba526c48000bd9fb065117abfd55 (patch)
tree9e37dfa36d37504a352bf42956828e1ec951e316 /sandbox/ctrezzo/src/services
parent7c66d5dff2273acf4d32da658d6ac5d59b9f20a7 (diff)
Refactoring to move src to it's own project module
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@686275 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/ctrezzo/src/services')
-rw-r--r--sandbox/ctrezzo/src/services/WordCount.java31
-rw-r--r--sandbox/ctrezzo/src/services/WordCountImpl.java69
2 files changed, 0 insertions, 100 deletions
diff --git a/sandbox/ctrezzo/src/services/WordCount.java b/sandbox/ctrezzo/src/services/WordCount.java
deleted file mode 100644
index a055efe76c..0000000000
--- a/sandbox/ctrezzo/src/services/WordCount.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package services;
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface WordCount {
-
- /*
- * Runs the Map-Reduce job.
- */
- void runJob();
-
-}
diff --git a/sandbox/ctrezzo/src/services/WordCountImpl.java b/sandbox/ctrezzo/src/services/WordCountImpl.java
deleted file mode 100644
index 0575506cc4..0000000000
--- a/sandbox/ctrezzo/src/services/WordCountImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package services;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.IntWritable;
-import org.apache.hadoop.io.Text;
-import org.apache.hadoop.mapred.JobClient;
-import org.apache.hadoop.mapred.JobConf;
-import org.osoa.sca.annotations.Property;
-
-public class WordCountImpl implements services.WordCount {
-
- //this path is a HDFS path
- @Property
- Path inputPath = new Path("/file01.txt");
-
- //this path is a HDFS path
- @Property
- Path outputPath = new Path("/output1");
-
- public void runJob() {
-
- org.apache.hadoop.examples.WordCount myCount = new org.apache.hadoop.examples.WordCount();
- Configuration conf = new Configuration();
-
- myCount.setConf(conf);
-
- JobConf mapredConf = new JobConf(myCount.getConf(), org.apache.hadoop.examples.WordCount.class);
- mapredConf.setJobName("wordcount");
-
- // the keys are words (strings)
- mapredConf.setOutputKeyClass(Text.class);
- // the values are counts (ints)
- mapredConf.setOutputValueClass(IntWritable.class);
-
- mapredConf.setMapperClass(org.apache.hadoop.examples.WordCount.MapClass.class);
- mapredConf.setCombinerClass(org.apache.hadoop.examples.WordCount.Reduce.class);
- mapredConf.setReducerClass(org.apache.hadoop.examples.WordCount.Reduce.class);
-
- mapredConf.setInputPath(inputPath);
- mapredConf.setOutputPath(outputPath);
-
- try {
- JobClient.runJob(mapredConf);
- }
- catch(Exception e) {
- System.out.println("ERROR: " + e);
- }
- }
-}