@Test(enabled = false) public void testUploadZip() throws IOException { String projectName = "project-upload"; String description = "This is a upload project test."; String flowName = "test-upload"; ensureProjectExist(projectName, description); File zipFile = createAzkabanZip(flowName); this.client.uploadProjectZip(projectName, zipFile); try { this.client.uploadProjectZip("Non-existed-project", zipFile); Assert.fail(); } catch (Exception e) { log.info("Expected exception " + e.toString()); } }
public AzkabanClientStatus uploadProjectZip(String projectName, File zipFile) throws AzkabanClientException { AzkabanMultiCallables.UploadProjectCallable callable = AzkabanMultiCallables.UploadProjectCallable.builder() .client(this) .projectName(projectName) .zipFile(zipFile) .build(); return runWithRetry(callable, AzkabanClientStatus.class); }
AzkabanClient implements Closeable { public AzkabanClientStatus uploadProjectZip(String projectName, File zipFile) throws AzkabanClientException { AzkabanMultiCallables.UploadProjectCallable callable = AzkabanMultiCallables.UploadProjectCallable.builder() .client(this) .projectName(projectName) .zipFile(zipFile) .build(); return runWithRetry(callable, AzkabanClientStatus.class); } }
AzkabanClient implements Closeable { public AzkabanClientStatus uploadProjectZip(String projectName, File zipFile) throws AzkabanClientException { AzkabanMultiCallables.UploadProjectCallable callable = AzkabanMultiCallables.UploadProjectCallable.builder() .client(this) .projectName(projectName) .zipFile(zipFile) .build(); return runWithRetry(callable, AzkabanClientStatus.class); } @Builder protected  AzkabanClient(String username,
                          String password,
                          String url,
                          long sessionExpireInMin,
                          CloseableHttpClient httpClient,
                          SessionManager sessionManager,
                          ExecutorService executorService); }
AzkabanClient implements Closeable { public AzkabanClientStatus uploadProjectZip(String projectName, File zipFile) throws AzkabanClientException { AzkabanMultiCallables.UploadProjectCallable callable = AzkabanMultiCallables.UploadProjectCallable.builder() .client(this) .projectName(projectName) .zipFile(zipFile) .build(); return runWithRetry(callable, AzkabanClientStatus.class); } @Builder protected  AzkabanClient(String username,
                          String password,
                          String url,
                          long sessionExpireInMin,
                          CloseableHttpClient httpClient,
                          SessionManager sessionManager,
                          ExecutorService executorService); AzkabanClientStatus createProject(String projectName,
                                           String description); AzkabanClientStatus deleteProject(String projectName); AzkabanClientStatus uploadProjectZip(String projectName,
                                              File zipFile); AzkabanExecuteFlowStatus executeFlowWithOptions(String projectName,
                                                         String flowName,
                                                         Map<String, String> flowOptions,
                                                         Map<String, String> flowParameters); AzkabanExecuteFlowStatus executeFlow(String projectName,
                                              String flowName,
                                              Map<String, String> flowParameters); AzkabanClientStatus cancelFlow(String execId); AzkabanClientStatus fetchExecutionLog(String execId,
                                               String jobId,
                                               String offset,
                                               String length,
                                               File ouf); AzkabanFetchExecuteFlowStatus fetchFlowExecution(String execId); AzkabanClientStatus addProxyUser(String projectName, String proxyUserName); AzkabanGetProxyUsersStatus getProxyUsers(String projectName); @Override void close(); }
AzkabanClient implements Closeable { public AzkabanClientStatus uploadProjectZip(String projectName, File zipFile) throws AzkabanClientException { AzkabanMultiCallables.UploadProjectCallable callable = AzkabanMultiCallables.UploadProjectCallable.builder() .client(this) .projectName(projectName) .zipFile(zipFile) .build(); return runWithRetry(callable, AzkabanClientStatus.class); } @Builder protected  AzkabanClient(String username,
                          String password,
                          String url,
                          long sessionExpireInMin,
                          CloseableHttpClient httpClient,
                          SessionManager sessionManager,
                          ExecutorService executorService); AzkabanClientStatus createProject(String projectName,
                                           String description); AzkabanClientStatus deleteProject(String projectName); AzkabanClientStatus uploadProjectZip(String projectName,
                                              File zipFile); AzkabanExecuteFlowStatus executeFlowWithOptions(String projectName,
                                                         String flowName,
                                                         Map<String, String> flowOptions,
                                                         Map<String, String> flowParameters); AzkabanExecuteFlowStatus executeFlow(String projectName,
                                              String flowName,
                                              Map<String, String> flowParameters); AzkabanClientStatus cancelFlow(String execId); AzkabanClientStatus fetchExecutionLog(String execId,
                                               String jobId,
                                               String offset,
                                               String length,
                                               File ouf); AzkabanFetchExecuteFlowStatus fetchFlowExecution(String execId); AzkabanClientStatus addProxyUser(String projectName, String proxyUserName); AzkabanGetProxyUsersStatus getProxyUsers(String projectName); @Override void close();  }