<?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: java api access security hbase ticket expires in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/java-api-access-security-hbase-ticket-expires/m-p/27297#M5880</link>
    <description>If you cannot get the admins to provide your app with a near-infinite&lt;BR /&gt;ticket lifetime, you need to instead loop the login process via a&lt;BR /&gt;daemon thread, such as via this thread snippet as an example:&lt;BR /&gt;&lt;BR /&gt;private void runLoginAndRenewalThread(final Configuration conf) throws&lt;BR /&gt;IOException {&lt;BR /&gt;// Do a blocking login first&lt;BR /&gt;SecurityUtil.login(conf, KEYTAB_CONF, KEYTAB_USER);&lt;BR /&gt;// Spawn the relogin thread next&lt;BR /&gt;Thread reloginThread = new Thread() {&lt;BR /&gt;@Override&lt;BR /&gt;public void run() {&lt;BR /&gt;while (true) {&lt;BR /&gt;try {&lt;BR /&gt;SecurityUtil.login(conf, KEYTAB_CONF, KEYTAB_USER);&lt;BR /&gt;Thread.sleep(ELEVEN_MINUTES);&lt;BR /&gt;} catch (IOException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;interrupt();&lt;BR /&gt;} catch (InterruptedException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;interrupt();&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;reloginThread.setDaemon(true);&lt;BR /&gt;reloginThread.start();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 12 May 2015 03:44:49 GMT</pubDate>
    <dc:creator>Harsh J</dc:creator>
    <dc:date>2015-05-12T03:44:49Z</dc:date>
    <item>
      <title>java api access security hbase ticket expires</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/java-api-access-security-hbase-ticket-expires/m-p/27296#M5879</link>
      <description>&lt;P&gt;My keytab ticket maxlife time is 7days. with the api code&lt;/P&gt;&lt;PRE&gt;UserGroupInformation.loginUserFromKeytab(conf.get("hbase.master.kerberos.principal"), conf.get("hbase.keytab.path"));&lt;/PRE&gt;&lt;P&gt;The ticket will&amp;nbsp;expire 7days later,how to fix it? (How to access hbase all the time?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rube&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:28:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/java-api-access-security-hbase-ticket-expires/m-p/27296#M5879</guid>
      <dc:creator>rube</dc:creator>
      <dc:date>2022-09-16T09:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: java api access security hbase ticket expires</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/java-api-access-security-hbase-ticket-expires/m-p/27297#M5880</link>
      <description>If you cannot get the admins to provide your app with a near-infinite&lt;BR /&gt;ticket lifetime, you need to instead loop the login process via a&lt;BR /&gt;daemon thread, such as via this thread snippet as an example:&lt;BR /&gt;&lt;BR /&gt;private void runLoginAndRenewalThread(final Configuration conf) throws&lt;BR /&gt;IOException {&lt;BR /&gt;// Do a blocking login first&lt;BR /&gt;SecurityUtil.login(conf, KEYTAB_CONF, KEYTAB_USER);&lt;BR /&gt;// Spawn the relogin thread next&lt;BR /&gt;Thread reloginThread = new Thread() {&lt;BR /&gt;@Override&lt;BR /&gt;public void run() {&lt;BR /&gt;while (true) {&lt;BR /&gt;try {&lt;BR /&gt;SecurityUtil.login(conf, KEYTAB_CONF, KEYTAB_USER);&lt;BR /&gt;Thread.sleep(ELEVEN_MINUTES);&lt;BR /&gt;} catch (IOException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;interrupt();&lt;BR /&gt;} catch (InterruptedException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;interrupt();&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;reloginThread.setDaemon(true);&lt;BR /&gt;reloginThread.start();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 12 May 2015 03:44:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/java-api-access-security-hbase-ticket-expires/m-p/27297#M5880</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-05-12T03:44:49Z</dc:date>
    </item>
  </channel>
</rss>

