Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Use impala JDBC in Java

Use impala JDBC in Java

Explorer

Hi,I'm use impala JDBC in java ,All is worked normally except “invalidate metadata”。

when use  “invalidate metadata itoa.table”,it has no error logs,but has no effective on table,this is my java program:

 

String sql="invalidate metadata itoa.table";

Statement st=conn.createStatement();

st.executeUpdate(sql);

when i runn it ,the tables'data is already old,but when i execute "invalidate metadata itoa.table" in impala-shell,it is right!

my english is bad,thanks!

4 REPLIES 4

Re: Use impala JDBC in Java

Expert Contributor

Hi lijiahui,

 

Can you see the "invalidate metadata itoa.table" query in the logfiles when you run it through JDBC?

 

Does it work if you run "invalidate metadata" without the table name?

 

What version of the JDBC driver are you using?

 

Cheers, Lars

Re: Use impala JDBC in Java

Explorer

sorry,i forget to see if  "invalidate metadata itoa.table" exists in the log files ,tomorrow i will have a look,thanks! the same i will try "invalidate metadata" without the tablename.

 

Re: Use impala JDBC in Java

Explorer

Thanks,i had resolvethis question ,because i use hdfs api open the filesystem and not closed。so i should closed fs first。

Highlighted

Re: Use impala JDBC in Java

Expert Contributor

Cool, glad you found the issue.