[virgil] r148 committed - Removed map/reduce function from data resource.

1 view
Skip to first unread message

virgil.apach...@codespot.com

unread,
Jan 20, 2012, 1:30:45 PM1/20/12
to virgil...@gmail.com
Revision: 148
Author: boneill42
Date: Fri Jan 20 10:30:28 2012
Log: Removed map/reduce function from data resource.

http://code.google.com/a/apache-extras.org/p/virgil/source/detail?r=148

Modified:
/trunk/server/src/main/java/org/apache/virgil/resource/DataResource.java

=======================================
---
/trunk/server/src/main/java/org/apache/virgil/resource/DataResource.java
Mon Jan 16 18:38:55 2012
+++
/trunk/server/src/main/java/org/apache/virgil/resource/DataResource.java
Fri Jan 20 10:30:28 2012
@@ -3,7 +3,6 @@
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
-import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@@ -15,7 +14,6 @@
import org.apache.virgil.VirgilService;
import org.apache.virgil.config.VirgilConfiguration;
import org.apache.virgil.ext.PATCH;
-import org.apache.virgil.mapreduce.JobSpawner;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
@@ -274,44 +272,6 @@
getCassandraStorage().deleteColumn(keyspace, columnFamily, key,
columnName,
config.getConsistencyLevel(consistencyLevel), purgeIndex);
}
-
- //
================================================================================================================
- // Map Reduce
- //
================================================================================================================
-
- @POST
- @Path("/job")
- @Produces({ "text/plain" })
- public void mapReduce(
- @QueryParam("params") String params,
- @QueryParam("jobName") String jobName,
@QueryParam("inputKeyspace") String inputKeyspace,
- @QueryParam("inputColumnFamily") String inputColumnFamily,
- @QueryParam("outputKeyspace") String outputKeyspace,
- @QueryParam("outputColumnFamily") String outputColumnFamily,
@QueryParam("remote") boolean remote,
- String source) throws Exception {
- if (inputKeyspace == null)
- throw new RuntimeException("Must supply inputKeyspace.");
- if (inputColumnFamily == null)
- throw new RuntimeException("Must supply inputColumnFamily.");
- if (outputKeyspace == null)
- throw new RuntimeException("Must supply outputKeyspace.");
- if (outputColumnFamily == null)
- throw new RuntimeException("Must supply outputColumnFamily.");
-
- if (logger.isDebugEnabled()) {
- logger.debug("Launching job [" + jobName + "]");
- logger.debug(" --> Input : Keyspace [" + inputKeyspace + "],
ColumnFamily [" + inputColumnFamily + "]");
- logger.debug(" <-- Output : Keyspace [" + outputKeyspace + "],
ColumnFamily [" + outputColumnFamily + "]");
- }
-
- if (remote) {
-
- } else {
- JobSpawner.spawnLocal(jobName, this.getCassandraStorage().getHost(),
- this.getCassandraStorage().getPort(), inputKeyspace,
- inputColumnFamily, outputKeyspace, outputColumnFamily, source,
params);
- }
- }

public CassandraStorage getCassandraStorage(){
return this.virgilService.getStorage();

Reply all
Reply to author
Forward
0 new messages