You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by le...@apache.org on 2012/11/03 22:09:14 UTC

svn commit: r1405417 [4/4] - in /gora/trunk: ./ bin/ gora-accumulo/src/main/java/org/apache/gora/accumulo/query/ gora-accumulo/src/main/java/org/apache/gora/accumulo/store/ gora-cassandra/src/main/java/org/apache/gora/cassandra/query/ gora-cassandra/sr...

Modified: gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java?rev=1405417&r1=1405416&r2=1405417&view=diff
==============================================================================
--- gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java (original)
+++ gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java Sat Nov  3 21:09:11 2012
@@ -77,7 +77,7 @@ public class LogManager {
    * Parses a log file and store the contents at the data store.
    * @param input the input file location
    */
-  private void parse(String input) throws IOException, ParseException {
+  private void parse(String input) throws IOException, ParseException, Exception {
     log.info("Parsing file:" + input);
     BufferedReader reader = new BufferedReader(new FileReader(input));
     long lineCount = 0;
@@ -136,19 +136,19 @@ public class LogManager {
   }
   
   /** Stores the pageview object with the given key */
-  private void storePageview(long key, Pageview pageview) throws IOException {
+  private void storePageview(long key, Pageview pageview) throws IOException, Exception {
 	log.info("Storing Pageview in: " + dataStore.toString());
     dataStore.put(key, pageview);
   }
   
   /** Fetches a single pageview object and prints it*/
-  private void get(long key) throws IOException {
+  private void get(long key) throws IOException, Exception {
     Pageview pageview = dataStore.get(key);
     printPageview(pageview);
   }
   
   /** Queries and prints a single pageview object */
-  private void query(long key) throws IOException {
+  private void query(long key) throws IOException, Exception {
     //Queries are constructed from the data store
     Query<Long, Pageview> query = dataStore.newQuery();
     query.setKey(key);
@@ -160,7 +160,7 @@ public class LogManager {
   }
   
   /** Queries and prints pageview object that have keys between startKey and endKey*/
-  private void query(long startKey, long endKey) throws IOException {
+  private void query(long startKey, long endKey) throws IOException, Exception {
     Query<Long, Pageview> query = dataStore.newQuery();
     //set the properties of query
     query.setStartKey(startKey);
@@ -181,7 +181,7 @@ public class LogManager {
   }
   
   /** This method illustrates delete by query call */
-  private void deleteByQuery(long startKey, long endKey) throws IOException {
+  private void deleteByQuery(long startKey, long endKey) throws IOException, Exception {
     //Constructs a query from the dataStore. The matching rows to this query will be deleted
     Query<Long, Pageview> query = dataStore.newQuery();
     //set the properties of query
@@ -192,7 +192,7 @@ public class LogManager {
     log.info("pageviews with keys between " + startKey + " and " + endKey + " are deleted");
   }
   
-  private void printResult(Result<Long, Pageview> result) throws IOException {
+  private void printResult(Result<Long, Pageview> result) throws IOException, Exception {
     
     while(result.next()) { //advances the Result object and breaks if at end
       long resultKey = result.getKey(); //obtain current key
@@ -215,7 +215,7 @@ public class LogManager {
     }
   }
   
-  private void close() throws IOException {
+  private void close() throws IOException, Exception {
     //It is very important to close the datastore properly, otherwise
     //some data loss might occur.
     if(dataStore != null)

Modified: gora/trunk/pom.xml
URL: http://svn.apache.org/viewvc/gora/trunk/pom.xml?rev=1405417&r1=1405416&r2=1405417&view=diff
==============================================================================
--- gora/trunk/pom.xml (original)
+++ gora/trunk/pom.xml Sat Nov  3 21:09:11 2012
@@ -557,6 +557,7 @@
         <module>gora-hbase</module>
         <module>gora-accumulo</module>
         <module>gora-cassandra</module>
+        <module>gora-dynamodb</module>
         <module>gora-sql</module>
         <module>gora-tutorial</module>
         <module>sources-dist</module>
@@ -573,6 +574,8 @@
         <hbase.version>0.90.4</hbase.version>
         <avro.version>1.3.3</avro.version>
         <cxf-rt-frontend-jaxrs.version>2.5.2</cxf-rt-frontend-jaxrs.version>
+        <!-- Amazon Dependencies -->
+        <amazon.version>1.3.12</amazon.version>
         <!-- Cassandra Dependencies -->
         <cassandra.version>1.1.2</cassandra.version>
         <libthrift.version>0.7.0</libthrift.version>
@@ -674,7 +677,19 @@
             <groupId>org.apache.gora</groupId>
             <artifactId>gora-tutorial</artifactId>
             <version>${project.version}</version>
-            </dependency>
+          </dependency>
+          
+          <dependency>
+            <groupId>org.apache.gora</groupId>
+            <artifactId>gora-dynamodb</artifactId>
+            <version>${project.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.gora</groupId>
+            <artifactId>gora-dynamodb</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+          </dependency>
   
           <!-- Avro needs this version of jackson -->
           <dependency>
@@ -772,18 +787,25 @@
                 <version>${cassandra.version}</version>
             </dependency>
 
-          <dependency>
-            <groupId>org.hectorclient</groupId>
-            <artifactId>hector-core</artifactId>
-            <version>${hector.version}</version>
-            <exclusions>
-	      <exclusion>
-		<groupId>org.apache.cassandra</groupId>
-		<artifactId>cassandra-all</artifactId>
-	      </exclusion>
-	    </exclusions>
-          </dependency>
-
+            <dependency>
+              <groupId>org.hectorclient</groupId>
+              <artifactId>hector-core</artifactId>
+              <version>${hector.version}</version>
+              <exclusions>
+	        <exclusion>
+		  <groupId>org.apache.cassandra</groupId>
+		  <artifactId>cassandra-all</artifactId>
+	        </exclusion>
+	      </exclusions>
+            </dependency>
+            
+            <!-- Amazon Dependencies -->
+            <dependency>
+                <groupId>com.amazonaws</groupId>
+                <artifactId>aws-java-sdk</artifactId>
+                <version>${amazon.version}</version>
+            </dependency>
+          
             <!-- Misc Dependencies -->
             <dependency>
                 <groupId>com.google.guava</groupId>