@Test public void testUpdateProject() throws OdpsException { Odps odps = OdpsTestUtils.newDefaultOdps(); Project project = odps.projects().get(); Map<String, String> properties = odps.projects().get().getProperties(); String oldValue = properties.get("READ_TABLE_MAX_ROW"); try { String newValue; if (oldValue == null) { newValue = "10000"; } else if ("9999".equals(oldValue)) { newValue = "10000"; } else { newValue = "9999"; } properties.put("READ_TABLE_MAX_ROW", newValue); odps.projects().updateProject(project.getName(), properties); project.reload(); assertEquals(newValue, project.getProperties().get("READ_TABLE_MAX_ROW")); } finally { if (oldValue == null || "9999".equals(oldValue)) { properties.put("READ_TABLE_MAX_ROW", "10000"); odps.projects().updateProject(project.getName(), properties); project.reload(); assertEquals("10000", project.getProperties().get("READ_TABLE_MAX_ROW")); } } }
public void updateProject(final String projectName, final Map<String, String> properties) throws OdpsException { updateProject(projectName, null, null, null, properties, null); }
Projects { public void updateProject(final String projectName, final Map<String, String> properties) throws OdpsException { updateProject(projectName, null, null, null, properties, null); } }
Projects { public void updateProject(final String projectName, final Map<String, String> properties) throws OdpsException { updateProject(projectName, null, null, null, properties, null); } Projects(RestClient client);   Projects(Odps odps); }
Projects { public void updateProject(final String projectName, final Map<String, String> properties) throws OdpsException { updateProject(projectName, null, null, null, properties, null); } Projects(RestClient client);   Projects(Odps odps); Project get(); Project get(String projectName); boolean exists(String projectName); void createExternalProject(final String projectName,
                                    final String comment,
                                    final String refProjectName,
                                    final Project.ExternalProjectProperties extProperties); void deleteExternalProject(final String projectName); void updateProject(final String projectName, final Map<String, String> properties); Iterator<Project> iterator(String owner); Iterable<Project> iterable(final String owner); }
Projects { public void updateProject(final String projectName, final Map<String, String> properties) throws OdpsException { updateProject(projectName, null, null, null, properties, null); } Projects(RestClient client);   Projects(Odps odps); Project get(); Project get(String projectName); boolean exists(String projectName); void createExternalProject(final String projectName,
                                    final String comment,
                                    final String refProjectName,
                                    final Project.ExternalProjectProperties extProperties); void deleteExternalProject(final String projectName); void updateProject(final String projectName, final Map<String, String> properties); Iterator<Project> iterator(String owner); Iterable<Project> iterable(final String owner);  }