[ https://issues.apache.org/jira/browse/ATLAS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Ding updated ATLAS-1867: -------------------------------- Attachment: ATLAS-1867.patch According to the Javadoc on the REST endpoint: {quote} /** * Bulk delete API for all types * @param typesDef A composite object that captures all types to be deleted * @throws Exception * @HTTP 204 On successful deletion of the requested type definitions * @HTTP 400 On validation failure for any type definitions */ {quote} The patch changes the response code on the client side. > org.apache.atlas.AtlasClientV2.deleteAtlasTypeDefs gives an exception > --------------------------------------------------------------------- > > Key: ATLAS-1867 > URL: https://issues.apache.org/jira/browse/ATLAS-1867 > Project: Atlas > Issue Type: Bug > Affects Versions: 0.8-incubating > Reporter: David Radley > Assignee: Richard Ding > Attachments: ATLAS-1867.patch > > > The org.apache.atlas.AtlasClientV2 is the Java API for Atlas. As such the > helper methods in it are the API. calling deleteAtlasTypeDefs gives the > exception > Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: > java.net.ProtocolException: HTTP method DELETE doesn't support output > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155) > at > com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105) > at com.sun.jersey.api.client.Client.handle(Client.java:652) > at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) > at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) > at > com.sun.jersey.api.client.WebResource$Builder.method(WebResource.java:634) > at > org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:298) > at > org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:285) > at org.apache.atlas.AtlasBaseClient.callAPI(AtlasBaseClient.java:427) > at > org.apache.atlas.AtlasClientV2.deleteAtlasTypeDefs(AtlasClientV2.java:258) > at > org.apache.atlas.examples.DeleteTypesFromJsonFileUtil.runTypeDelete(DeleteTypesFromJsonFileUtil.java:73) > at > org.apache.atlas.examples.DeleteTypesFromJsonFileUtil.main(DeleteTypesFromJsonFileUtil.java:58) > Caused by: java.net.ProtocolException: HTTP method DELETE doesn't support > output > at > sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1083) > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler$1$1.getOutputStream(URLConnectionClientHandler.java:238) > at > com.sun.jersey.api.client.CommittingOutputStream.commitStream(CommittingOutputStream.java:117) > at > com.sun.jersey.api.client.CommittingOutputStream.write(CommittingOutputStream.java:89) > at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) > at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) > at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295) > at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) > at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) > at java.io.BufferedWriter.flush(BufferedWriter.java:254) > at > com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java:191) > at > com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:128) > at > com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:88) > at > com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:58) > at > com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:300) > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217) > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153) > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)