/** * Instantiates a new sample queries. * * @throws JAXBException the JAXB exception */ public SampleQueries() throws JAXBException { metaClient = new LensMetadataClient(LensClientSingletonWrapper.instance().getClient().getConnection()); queryClient = new LensStatement(LensClientSingletonWrapper.instance().getClient().getConnection()); }
public LensClient(LensClientConfig conf, String username, String password) { this.conf = conf; conf.setUser(username); this.password = password; connectToLensServer(); mc = new LensMetadataClient(connection); statement = new LensStatement(connection); }
/** * Construct parameters required to connect to lens server using values in lens-client-site.xml */ public LensConnectionParams() { this.conf = new LensClientConfig(); setupRequestFilters(); }
/** * Close. */ public void close() { LensClientSingletonWrapper.instance().getClient().closeConnection(); }
public LensMLClient(LensClient lensClient) { client = new LensMLJerseyClient(lensClient.getConnection(), lensClient .getConnection().getSessionHandle()); }
private LensClientConfig createLensClientConfigWithServerUrl() { LensClientConfig config = new LensClientConfig(); config.set("lens.server.base.url", "http://localhost:" + getTestPort() + "/lensapi"); return config; } }
/** * Gets the result set meta data for the most recently executed query. */ public QueryResultSetMetadata getResultSetMetaData() { return this.getResultSetMetaData(this.getQuery()); }
public APIResult addPartitionToDimensionTable(String dimTblName, String storage, String partitionSpec) { try { return addPartitionToDimensionTable(dimTblName, storage, (XPartition) readFromXML(partitionSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
public APIResult addPartitionsToFactTable(String fact, String storage, String partitionsSpec) { try { return addPartitionsToFactTable(fact, storage, (XPartitionList) readFromXML(partitionsSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
/** * Gets the user for the lens session */ public String getUser() { return this.connection.getLensConnectionParams().getUser(); } }
public LensClientResultSetWithStats getResultsFromPrepared(QueryPrepareHandle phandle, String queryName) { QueryHandle qh = statement.executeQuery(phandle, true, queryName); return getResultsFromHandle(qh, true); }
public APIResult addStorageToFactTable(String factname, String storageSpec) { try { return addStorageToFactTable(factname, this.<XStorageTableElement>readFromXML(storageSpec)); } catch (JAXBException | IOException e) { return failureAPIResult(e); } }
/** * Get the username from config * * @return Returns lens client user name */ public String getUser() { return this.get(USER_NAME, DEFAULT_USER_NAME); }
/** * Instantiates a new lens client config. */ public LensClientConfig() { super(false); addResource("lens-client-default.xml"); addResource("lens-client-site.xml"); }
public SampleMetastore() throws JAXBException { metaClient = new LensMetadataClient(LensClientSingletonWrapper.instance().getClient().getConnection()); }
public LensClient(LensClientConfig conf, String username, String password) { this.conf = conf; conf.setUser(username); this.password = password; connectToLensServer(); mc = new LensMetadataClient(connection); statement = new LensStatement(connection); }
/** * Construct parameters required to connect to lens server using values in lens-client-site.xml */ public LensConnectionParams() { this.conf = new LensClientConfig(); setupRequestFilters(); }
/** * Gets the user for the lens session */ public String getUser() { return this.connection.getLensConnectionParams().getUser(); } }
public LensClientResultSetWithStats getResultsFromPrepared(QueryPrepareHandle phandle, String queryName) { QueryHandle qh = statement.executeQuery(phandle, true, queryName); return getResultsFromHandle(qh, true); }
public PopulateSampleMetastore() throws JAXBException { metaClient = new LensMetadataClient(LensClientSingletonWrapper.instance().getClient().getConnection()); }