> On May 2, 2016, 2 p.m., Raju Bairishetti wrote: > > lens-client/src/main/java/org/apache/lens/client/LensStatement.java, line > > 312 > > <https://reviews.apache.org/r/46767/diff/2/?file=1368323#file1368323line312> > > > > Can we have a limit on the maximum number of retries instead of > > retrying until the query execution successful?
Scheanrio : User fires a query and is waiting (via WaitForQueryToComplete) for the result. The query takes say 12 hours to finish. In the mean time user goes offline. Just before going offline the get Query call was sent by the user/client and received by the server Behaviour before the chnage was : The server respondes, but the response was never received by the cleint as it went offline. The default behvaiour was that jersey client has infinite READ_TIMEOUT and due to this the client program gets hung. This continues even when user comes back online. Current Behaviour: The client times out after 5 mins and tries again and again. Once the user is back online (say after 12 hours), getQuery goes thorugh and the client can procede with his processing. Putting a cap on re-tries is not what is intended here. If we come acrosss a use case that desires that, we can expose org.apache.lens.client.LensStatement#waitForQueryToComplete(org.apache.lens.api.query.QueryHandle, boolean) which is package protected now. - Puneet ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46767/#review131308 ----------------------------------------------------------- On May 2, 2016, 10:34 a.m., Puneet Gupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46767/ > ----------------------------------------------------------- > > (Updated May 2, 2016, 10:34 a.m.) > > > Review request for lens. > > > Bugs: lens-383 > https://issues.apache.org/jira/browse/lens-383 > > > Repository: lens > > > Description > ------- > > To handle cases where server is not responding or slow in response, we need > to put timeouts on api calls in lens client. > > Note: > This patch hanlde changes for lens-client users only (lens-regression and > lens-ml-lib are also creating clients for limited functionality which is not > addressed here) > > > Diffs > ----- > > lens-client/src/main/java/org/apache/lens/client/LensClientConfig.java > 6a35a5e > lens-client/src/main/java/org/apache/lens/client/LensConnection.java > 0c2557c > lens-client/src/main/java/org/apache/lens/client/LensStatement.java f06bcd1 > lens-client/src/main/resources/lens-client-default.xml 5a578a7 > lens-client/src/test/java/org/apache/lens/client/TestLensClient.java > 6e638f1 > > lens-client/src/test/java/org/apache/lens/server/MockQueryExecutionServiceImpl.java > PRE-CREATION > src/site/apt/admin/config.apt b5853bf > src/site/apt/user/client-config.apt 4ed41b4 > > Diff: https://reviews.apache.org/r/46767/diff/ > > > Testing > ------- > > [INFO] > > [INFO] > ------------------------------------------------------------------------ > [INFO] Building Lens client 2.6.0-beta-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lens-client --- > [INFO] > [INFO] --- maven-remote-resources-plugin:1.5:process (default) @ lens-client > --- > [INFO] > [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ > lens-client --- > [INFO] Using 'UTF-8' encoding to copy filtered resources. > [INFO] skip non existing resourceDirectory > /d0/jenkins/workspace/Platform_Common_Job/lens-client/src/deb/control > [INFO] Copying 1 resource > [INFO] Copying 3 resources > [INFO] > [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ lens-client > --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 34 source files to > /d0/jenkins/workspace/Platform_Common_Job/lens-client/target/classes > [WARNING] > /d0/jenkins/workspace/Platform_Common_Job/lens-client/src/main/java/org/apache/lens/client/jdbc/LensJdbcResultSet.java: > > /d0/jenkins/workspace/Platform_Common_Job/lens-client/src/main/java/org/apache/lens/client/jdbc/LensJdbcResultSet.java > uses or overrides a deprecated API. > [WARNING] > /d0/jenkins/workspace/Platform_Common_Job/lens-client/src/main/java/org/apache/lens/client/jdbc/LensJdbcResultSet.java: > Recompile with -Xlint:deprecation for details. > [INFO] > [INFO] --- maven-dependency-plugin:2.8:build-classpath (build-classpath) @ > lens-client --- > [INFO] Wrote classpath file > '/d0/jenkins/workspace/Platform_Common_Job/lens-client/target/classpath'. > [INFO] > [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ > lens-client --- > [INFO] Using 'UTF-8' encoding to copy filtered resources. > [INFO] Copying 9 resources > [INFO] Copying 3 resources > [INFO] > [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ > lens-client --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 5 source files to > /d0/jenkins/workspace/Platform_Common_Job/lens-client/target/test-classes > [INFO] > [INFO] --- maven-surefire-plugin:2.15:test (default-test) @ lens-client --- > [INFO] Surefire report directory: > /d0/jenkins/workspace/Platform_Common_Job/lens-client/target/surefire-reports > > ------------------------------------------------------- > T E S T S > ------------------------------------------------------- > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; > support was removed in 8.0 > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; > support was removed in 8.0 > Running TestSuite > Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 84.336 sec - > in TestSuite > > Results : > > Tests run: 25, Failures: 0, Errors: 0, Skipped: 0 > > > Thanks, > > Puneet Gupta > >
