@Test public void testGetModel() throws OdpsException { OfflineModels models = odps.offlineModels(); for (OfflineModel model : models) { System.out.println(model.getName()); assertTrue(model.getOwner() != null); assertTrue(model.getProject() != null); assertTrue(model.getLastModifiedTime() != null); assertTrue(model.getCreatedTime() != null); String value = model.getModel(); assertTrue(value != null); } }
public String getModel() throws OdpsException { String resource = ResourceBuilder.buildOfflineModelResource( project, modelDesc.modelName); HashMap<String, String> params = new HashMap<String, String>(); params.put("data", null); Response response = client.request(resource, "GET", params, null, null, 0); try { return new String(response.getBody(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new OdpsException(e.getMessage(), e); } }
OfflineModel extends LazyLoad { public String getModel() throws OdpsException { String resource = ResourceBuilder.buildOfflineModelResource( project, modelDesc.modelName); HashMap<String, String> params = new HashMap<String, String>(); params.put("data", null); Response response = client.request(resource, "GET", params, null, null, 0); try { return new String(response.getBody(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new OdpsException(e.getMessage(), e); } } }
OfflineModel extends LazyLoad { public String getModel() throws OdpsException { String resource = ResourceBuilder.buildOfflineModelResource( project, modelDesc.modelName); HashMap<String, String> params = new HashMap<String, String>(); params.put("data", null); Response response = client.request(resource, "GET", params, null, null, 0); try { return new String(response.getBody(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new OdpsException(e.getMessage(), e); } } OfflineModel(OfflineModelDesc desc, String project, Odps odps); }
OfflineModel extends LazyLoad { public String getModel() throws OdpsException { String resource = ResourceBuilder.buildOfflineModelResource( project, modelDesc.modelName); HashMap<String, String> params = new HashMap<String, String>(); params.put("data", null); Response response = client.request(resource, "GET", params, null, null, 0); try { return new String(response.getBody(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new OdpsException(e.getMessage(), e); } } OfflineModel(OfflineModelDesc desc, String project, Odps odps); String getProject(); String getName(); String getOwner(); @Override void reload(); String getModel(); Date getCreatedTime(); Date getLastModifiedTime(); String getType(); }
OfflineModel extends LazyLoad { public String getModel() throws OdpsException { String resource = ResourceBuilder.buildOfflineModelResource( project, modelDesc.modelName); HashMap<String, String> params = new HashMap<String, String>(); params.put("data", null); Response response = client.request(resource, "GET", params, null, null, 0); try { return new String(response.getBody(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new OdpsException(e.getMessage(), e); } } OfflineModel(OfflineModelDesc desc, String project, Odps odps); String getProject(); String getName(); String getOwner(); @Override void reload(); String getModel(); Date getCreatedTime(); Date getLastModifiedTime(); String getType();  }