[ARVADOS] created: f3c4565205413dfeeaa1d2f58634250497d4cf71

git at public.curoverse.com git at public.curoverse.com
Tue May 19 15:20:05 EDT 2015


        at  f3c4565205413dfeeaa1d2f58634250497d4cf71 (commit)


commit f3c4565205413dfeeaa1d2f58634250497d4cf71
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue May 19 15:20:16 2015 -0400

    6071: Fix URL

diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml
index a04a299..13e1c6a 100644
--- a/sdk/java/pom.xml
+++ b/sdk/java/pom.xml
@@ -6,7 +6,7 @@
   <packaging>jar</packaging>
   <version>1.1</version>
   <name>arvados-sdk</name>
-  <url>http://maven.apache.org</url>
+  <url>http://arvados.org</url>
 
   <dependencies>
     <dependency>

commit 836999ec3a4d5fc6c9f087a03b131bab06121079
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue May 19 13:55:57 2015 -0400

    6071: Refactor project organization a bit.

diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml
index 53e8f75..a04a299 100644
--- a/sdk/java/pom.xml
+++ b/sdk/java/pom.xml
@@ -1,11 +1,11 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
-  <groupId>org.arvados.sdk.java</groupId>
-  <artifactId>java</artifactId>
+  <groupId>org.arvados.sdk</groupId>
+  <artifactId>arvados</artifactId>
   <packaging>jar</packaging>
-  <version>1.0-SNAPSHOT</version>
-  <name>java</name>
+  <version>1.1</version>
+  <name>arvados-sdk</name>
   <url>http://maven.apache.org</url>
 
   <dependencies>
@@ -48,7 +48,7 @@
   </dependencies>
 
   <build>
-    <finalName>arvados-sdk-1.0</finalName>
+    <finalName>arvados-sdk-1.1</finalName>
 
     <plugins>
       <plugin>
diff --git a/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java b/sdk/java/src/main/java/org/arvados/sdk/Arvados.java
similarity index 99%
rename from sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
rename to sdk/java/src/main/java/org/arvados/sdk/Arvados.java
index 004ba67..a6438d5 100644
--- a/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
+++ b/sdk/java/src/main/java/org/arvados/sdk/Arvados.java
@@ -1,4 +1,4 @@
-package org.arvados.sdk.java;
+package org.arvados.sdk;
 
 import com.google.api.client.http.javanet.*;
 import com.google.api.client.http.ByteArrayContent;
diff --git a/sdk/java/src/main/java/org/arvados/sdk/java/MethodDetails.java b/sdk/java/src/main/java/org/arvados/sdk/MethodDetails.java
similarity index 94%
rename from sdk/java/src/main/java/org/arvados/sdk/java/MethodDetails.java
rename to sdk/java/src/main/java/org/arvados/sdk/MethodDetails.java
index 2479246..d77b7f1 100644
--- a/sdk/java/src/main/java/org/arvados/sdk/java/MethodDetails.java
+++ b/sdk/java/src/main/java/org/arvados/sdk/MethodDetails.java
@@ -1,4 +1,4 @@
-package org.arvados.sdk.java;
+package org.arvados.sdk;
 
 import com.google.api.client.util.Lists;
 import com.google.api.client.util.Sets;
@@ -19,4 +19,4 @@ public class MethodDetails implements Comparable<MethodDetails> {
       }
       return name.compareTo(o.name);
     }
-}
\ No newline at end of file
+}

commit 3c517a48e838cbd1c8b1fcc27623fb9ddd33c356
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue May 19 13:52:51 2015 -0400

    6071: Increase default timeout and enable retry support.

diff --git a/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java b/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
index 2c03639..004ba67 100644
--- a/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
+++ b/sdk/java/src/main/java/org/arvados/sdk/java/Arvados.java
@@ -3,6 +3,7 @@ package org.arvados.sdk.java;
 import com.google.api.client.http.javanet.*;
 import com.google.api.client.http.ByteArrayContent;
 import com.google.api.client.http.GenericUrl;
+import com.google.api.client.http.HttpBackOffIOExceptionHandler;
 import com.google.api.client.http.HttpContent;
 import com.google.api.client.http.HttpRequest;
 import com.google.api.client.http.HttpRequestFactory;
@@ -10,6 +11,7 @@ import com.google.api.client.http.HttpTransport;
 import com.google.api.client.http.UriTemplate;
 import com.google.api.client.json.JsonFactory;
 import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.util.ExponentialBackOff;
 import com.google.api.client.util.Maps;
 import com.google.api.services.discovery.Discovery;
 import com.google.api.services.discovery.model.JsonSchema;
@@ -33,10 +35,10 @@ import org.json.simple.JSONObject;
 
 /**
  * This class provides a java SDK interface to Arvados API server.
- * 
+ *
  * Please refer to http://doc.arvados.org/api/ to learn about the
  *  various resources and methods exposed by the API server.
- *  
+ *
  * @author radhika
  */
 public class Arvados {
@@ -79,7 +81,7 @@ public class Arvados {
     if (host != null) {
       arvadosApiHost = host;
     } else {
-      arvadosApiHost = System.getenv().get("ARVADOS_API_HOST");      
+      arvadosApiHost = System.getenv().get("ARVADOS_API_HOST");
       if (arvadosApiHost == null) {
         throw new Exception("Missing environment variable: ARVADOS_API_HOST");
       }
@@ -120,7 +122,7 @@ public class Arvados {
     HashMap<String, Object> parameters = loadParameters(paramsMap, method);
 
     GenericUrl url = new GenericUrl(UriTemplate.expand(
-        arvadosRootUrl + restDescription.getBasePath() + method.getPath(), 
+        arvadosRootUrl + restDescription.getBasePath() + method.getPath(),
         parameters, true));
 
     try {
@@ -145,6 +147,12 @@ public class Arvados {
       HttpRequest request =
           requestFactory.buildRequest(method.getHttpMethod(), url, content);
 
+      // Set read timeout to 45 seconds (up from default of 20 seconds)
+      request.setReadTimeout(45 * 1000);
+
+      // Add retry behavior
+      request.setIOExceptionHandler(new HttpBackOffIOExceptionHandler(new ExponentialBackOff()));
+
       // make the request
       List<String> authHeader = new ArrayList<String>();
       authHeader.add("OAuth2 " + arvadosApiToken);
@@ -212,7 +220,7 @@ public class Arvados {
               if (Boolean.TRUE.equals(required)) {
                 requiredParameters.add(property);
               } else {
-                optionalParameters.add(property);                
+                optionalParameters.add(property);
               }
             }
           }
@@ -282,7 +290,7 @@ public class Arvados {
     Map<String, RestMethod> methodMap = getMatchingMethodMap(resourceName);
 
     if (methodName == null) {
-      error("missing method name");      
+      error("missing method name");
     }
 
     RestMethod method =
@@ -297,7 +305,7 @@ public class Arvados {
   private Map<String, RestMethod> getMatchingMethodMap(String resourceName)
       throws Exception {
     if (resourceName == null) {
-      error("missing resource name");      
+      error("missing resource name");
     }
 
     Map<String, RestMethod> methodMap = null;

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list