Reply
Explorer
Posts: 14
Registered: ‎11-28-2016

Use impala JDBC in Java

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!

Cloudera Employee
Posts: 82
Registered: ‎12-07-2015

Re: Use impala JDBC in Java

[ Edited ]

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

Explorer
Posts: 14
Registered: ‎11-28-2016

Re: Use impala JDBC in Java

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.

 

Explorer
Posts: 14
Registered: ‎11-28-2016

Re: Use impala JDBC in Java

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

Cloudera Employee
Posts: 82
Registered: ‎12-07-2015

Re: Use impala JDBC in Java

Cool, glad you found the issue.