<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Curl throws error when running allow snapshot in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Curl-throws-error-when-running-allow-snapshot/m-p/293905#M216926</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/49640"&gt;@sarm&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;What is your HDFS version? Is it Hadoop 2.8.0, 3.0.0-alpha1 or higher?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# hadoop version&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quick check on what the JAR contains?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# javap -cp /usr/hdp/3.1.0.0-78/hadoop/client/hadoop-hdfs-client.jar org.apache.hadoop.hdfs.web.resources.PutOpParam.Op | grep -i ALLOW

  public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op ALLOWSNAPSHOT;
  public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op DISALLOWSNAPSHOT;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example i am able to use the same WebHDFS API call without any issue as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# curl -i -X PUT "http://kerlatest1.example.com:50070/webhdfs/v1/tmp/aaaa_bbbb?op=DISALLOWSNAPSHOT&amp;amp;user.name=hdfs"

HTTP/1.1 200 OK
Date: Tue, 14 Apr 2020 03:45:24 GMT
Cache-Control: no-cache
Expires: Tue, 14 Apr 2020 03:45:24 GMT
Date: Tue, 14 Apr 2020 03:45:24 GMT
Pragma: no-cache
X-FRAME-OPTIONS: SAMEORIGIN
Set-Cookie: hadoop.auth="u=hdfs&amp;amp;p=hdfs&amp;amp;t=simple&amp;amp;e=1586871924286&amp;amp;s=xxxxxxxx/yyyyyyyyy="; Path=/; HttpOnly
Content-Type: application/octet-stream
Content-Length: 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please refer to the following JIRA to verify if you are using the correct version (like&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;2.8.0, 3.0.0-alpha1 or higher&lt;/STRONG&gt;&lt;/EM&gt;) of HDFS where this option is available?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Reference:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;A href="https://issues.apache.org/jira/browse/HDFS-9057" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/HDFS-9057&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+2.8.0+Release" target="_blank" rel="noopener"&gt;https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+2.8.0+Release&lt;/A&gt; (look for HDFS-9057)&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2020 04:01:06 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2020-04-14T04:01:06Z</dc:date>
    <item>
      <title>Curl throws error when running allow snapshot</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Curl-throws-error-when-running-allow-snapshot/m-p/293904#M216925</link>
      <description>&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make a directory as a snapshot directory using curl API ,when i run the curl for Allowsnapshot it throws below error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is Appreciated..&lt;/P&gt;&lt;P&gt;Thanks in Advance ..!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -i -X PUT "http://internal:50070/webhdfs/v1/dummy/?op=DISALLOWSNAPSHOT"&lt;BR /&gt;HTTP/1.1 400 Bad Request&lt;BR /&gt;Cache-Control: no-cache&lt;BR /&gt;Expires: Tue, 14 Apr 2020 03:26:30 GMT&lt;BR /&gt;Date: Tue, 14 Apr 2020 03:26:30 GMT&lt;BR /&gt;Pragma: no-cache&lt;BR /&gt;Expires: Tue, 14 Apr 2020 03:26:30 GMT&lt;BR /&gt;Date: Tue, 14 Apr 2020 03:26:30 GMT&lt;BR /&gt;Pragma: no-cache&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;X-FRAME-OPTIONS: SAMEORIGIN&lt;BR /&gt;Transfer-Encoding: chunked&lt;BR /&gt;Server: Jetty(6.1.26.hwx)&lt;/P&gt;&lt;P&gt;{"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException","message":"Invalid value for webhdfs parameter \"op\": No enum constant org.apache.hadoop.hdfs.web.resources.PutOpParam.Op.DISALLOWSNAPSHOT"}}[&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 03:36:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Curl-throws-error-when-running-allow-snapshot/m-p/293904#M216925</guid>
      <dc:creator>sarm</dc:creator>
      <dc:date>2020-04-14T03:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Curl throws error when running allow snapshot</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Curl-throws-error-when-running-allow-snapshot/m-p/293905#M216926</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/49640"&gt;@sarm&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;What is your HDFS version? Is it Hadoop 2.8.0, 3.0.0-alpha1 or higher?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# hadoop version&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quick check on what the JAR contains?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# javap -cp /usr/hdp/3.1.0.0-78/hadoop/client/hadoop-hdfs-client.jar org.apache.hadoop.hdfs.web.resources.PutOpParam.Op | grep -i ALLOW

  public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op ALLOWSNAPSHOT;
  public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op DISALLOWSNAPSHOT;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example i am able to use the same WebHDFS API call without any issue as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# curl -i -X PUT "http://kerlatest1.example.com:50070/webhdfs/v1/tmp/aaaa_bbbb?op=DISALLOWSNAPSHOT&amp;amp;user.name=hdfs"

HTTP/1.1 200 OK
Date: Tue, 14 Apr 2020 03:45:24 GMT
Cache-Control: no-cache
Expires: Tue, 14 Apr 2020 03:45:24 GMT
Date: Tue, 14 Apr 2020 03:45:24 GMT
Pragma: no-cache
X-FRAME-OPTIONS: SAMEORIGIN
Set-Cookie: hadoop.auth="u=hdfs&amp;amp;p=hdfs&amp;amp;t=simple&amp;amp;e=1586871924286&amp;amp;s=xxxxxxxx/yyyyyyyyy="; Path=/; HttpOnly
Content-Type: application/octet-stream
Content-Length: 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please refer to the following JIRA to verify if you are using the correct version (like&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;2.8.0, 3.0.0-alpha1 or higher&lt;/STRONG&gt;&lt;/EM&gt;) of HDFS where this option is available?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Reference:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;A href="https://issues.apache.org/jira/browse/HDFS-9057" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/HDFS-9057&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+2.8.0+Release" target="_blank" rel="noopener"&gt;https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+2.8.0+Release&lt;/A&gt; (look for HDFS-9057)&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 04:01:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Curl-throws-error-when-running-allow-snapshot/m-p/293905#M216926</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2020-04-14T04:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Curl throws error when running allow snapshot</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Curl-throws-error-when-running-allow-snapshot/m-p/293907#M216928</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/50614"&gt;@jsensharma&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your comments .!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe i am using lower version of hadoop that is why the reason i am facing the issue&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hadoop 2.7.3.2.6.5.0-292&lt;BR /&gt;Subversion git@github.com:hortonworks/hadoop.git -r 3091053c59a62c82d82c9f778c48bde5ef0a89a1&lt;BR /&gt;Compiled by jenkins on 2018-05-11T07:53Z&lt;BR /&gt;Compiled with protoc 2.5.0&lt;BR /&gt;From source with checksum abed71da5bc89062f6f6711179f2058&lt;BR /&gt;This command was run using /usr/hdp/2.6.5.0-292/hadoop/hadoop-common-2.7.3.2.6.5.0-292.jar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#javap -cp /usr/hdp/2.6.5.0-292/hadoop-hdfs//hadoop-hdfs-2.7.3.2.6.5.0-292.jar org.apache.hadoop.hdfs.web.resources.PutOpParam.Op&lt;BR /&gt;Compiled from "PutOpParam.java"&lt;BR /&gt;public final class org.apache.hadoop.hdfs.web.resources.PutOpParam$Op extends java.lang.Enum&amp;lt;org.apache.hadoop.hdfs.web.resources.PutOpParam$Op&amp;gt; implements org.apache.hadoop.hdfs.web.resources.HttpOpParam$Op {&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op CREATE;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op MKDIRS;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op CREATESYMLINK;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op RENAME;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op SETREPLICATION;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op SETOWNER;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op SETPERMISSION;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op SETTIMES;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op RENEWDELEGATIONTOKEN;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op CANCELDELEGATIONTOKEN;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op MODIFYACLENTRIES;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op REMOVEACLENTRIES;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op REMOVEDEFAULTACL;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op REMOVEACL;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op SETACL;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op SETXATTR;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op REMOVEXATTR;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op CREATESNAPSHOT;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op RENAMESNAPSHOT;&lt;BR /&gt;public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op NULL;&lt;BR /&gt;final boolean doOutputAndRedirect;&lt;BR /&gt;final int expectedHttpResponseCode;&lt;BR /&gt;final boolean requireAuth;&lt;BR /&gt;public static org.apache.hadoop.hdfs.web.resources.PutOpParam$Op[] values();&lt;BR /&gt;public static org.apache.hadoop.hdfs.web.resources.PutOpParam$Op valueOf(java.lang.String);&lt;BR /&gt;public org.apache.hadoop.hdfs.web.resources.HttpOpParam$Type getType();&lt;BR /&gt;public boolean getRequireAuth();&lt;BR /&gt;public boolean getDoOutput();&lt;BR /&gt;public boolean getRedirect();&lt;BR /&gt;public int getExpectedHttpResponseCode();&lt;BR /&gt;public java.lang.String toQueryString();&lt;BR /&gt;static {};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 04:50:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Curl-throws-error-when-running-allow-snapshot/m-p/293907#M216928</guid>
      <dc:creator>sarm</dc:creator>
      <dc:date>2020-04-14T04:50:45Z</dc:date>
    </item>
  </channel>
</rss>

