Hi, thanks for the reply. I've tried to invoke commit explicitly, no luck. executeUpdate still returns 1 (I assume one record has been saved). Select returns empty resultset.
2015-06-23 18:11 GMT+02:00 Samarth Jain <[email protected]>: > Hi Serega, > > Do you know if auto-commit is on for the connection returned by > getJdbcFacade().createConnection(). > If not, you need to call connection.commit() after executeUpdate() > > -Samarth > > On Tuesday, June 23, 2015, Serega Sheypak <[email protected]> > wrote: > >> Hi, I'm testing dummy code: >> >> int result = getJdbcFacade().createConnection().prepareStatement("upsert >> into unique_site_visitor (visitorId, siteId, visitTs) values ('xxxyyyzzz', >> 1, 2)").executeUpdate(); >> LOG.debug("executeUpdate result: {}", result); >> //executeUpdate result: 1 >> >> LOG.debug("selecting ..."); >> ResultSet resultSet = >> getJdbcFacade().createConnection().prepareStatement("select visitorId from >> unique_site_visitor").executeQuery(); >> while(resultSet.next()){ >> LOG.debug("resultSet visitorId ::: {}", >> resultSet.getString("visitorId")); >> } >> >> returns no rows. >> >> What do I do wrong? Why I don't see results stored to HBase? >> I don't see any exceptions on client/server side. >> >> >> Are there any tricks with connection management? >> >
