Examples of MetadataClient


Examples of com.salesforce.phoenix.schema.MetaDataClient

                    .setMessage("Node: " + node).build().buildException();
            }
            LiteralExpression expression = (LiteralExpression)node.accept(expressionCompiler);
            splits[i] = expression.getBytes();
        }
        final MetaDataClient client = new MetaDataClient(connection);
       
        return new MutationPlan() {

            @Override
            public ParameterMetaData getParameterMetaData() {
                return context.getBindManager().getParameterMetaData();
            }

            @Override
            public PhoenixConnection getConnection() {
                return connection;
            }

            @Override
            public MutationState execute() throws SQLException {
                return client.createIndex(create, splits);
            }

            @Override
            public ExplainPlan getExplainPlan() throws SQLException {
                return new ExplainPlan(Collections.singletonList("CREATE INDEX"));
View Full Code Here

Examples of com.sun.xml.ws.mex.client.MetadataClient

     * and the second one will be portName.
     */
    protected static QName[]  doMexRequest(final String wsdlLocation, final String stsURI) throws WSTrustException {

        final QName[] serviceInfo = new QName[2];
        final MetadataClient mexClient = new MetadataClient();

        final Metadata metadata = mexClient.retrieveMetadata(wsdlLocation);

        //this method gives the names of services and the corresponding port details
        if(metadata != null){
            final List<PortInfo> ports = mexClient.getServiceInformation(metadata);

            //we have to iterate through this to get the appropriate serviceName and portname
            for(PortInfo port : ports){
                final String uri = port.getAddress();

View Full Code Here

Examples of io.fathom.auto.openstack.metadata.MetadataClient

    Metadata metadata;

    public Metadata getMetadata() throws RestClientException {
        if (metadata == null) {
            MetadataClient metadataClient = MetadataClient.INSTANCE;
            Metadata metadata = metadataClient.getMetadata();
            this.metadata = metadata;
        }
        return metadata;
    }
View Full Code Here

Examples of io.fathom.auto.openstack.metadata.MetadataClient

    OpenstackClient client;

    public OpenstackClient getOpenstackClient() throws RestClientException {
        if (client == null) {
            MetadataClient metadataClient = MetadataClient.INSTANCE;

            String serviceToken = metadataClient.getSecretString("token");
            serviceToken = serviceToken.trim();
            Metadata metadata = getMetadata();

            URI identityEndpoint = URI.create(metadata.getTopLevel("identity_uri"));

            HttpClient httpClient = metadataClient.getHttpClient();
            OpenstackIdentityClient identityClient = new OpenstackIdentityClient(httpClient, identityEndpoint, null);

            StaticTokenProvider tokenProvider = new StaticTokenProvider(identityClient, serviceToken);

            this.client = OpenstackClient.build(tokenProvider);
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

         * current time at execution time. In that case, we'll call MetaDataClient.updateCache
         * purely to bind the current time based on the server time.
         */
        PTable table = this.getCurrentTable().getTable();
        PhoenixConnection connection = getConnection();
        MetaDataClient client = new MetaDataClient(connection);
        currentTime = client.getCurrentTime(table.getSchemaName().getString(), table.getTableName().getString());
        return currentTime;
    }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

     */
    private long[] validate() throws SQLException {
        int i = 0;
        Long scn = connection.getSCN();
        PName tenantId = connection.getTenantId();
        MetaDataClient client = new MetaDataClient(connection);
        long[] timeStamps = new long[this.mutations.size()];
        for (Map.Entry<TableRef, Map<ImmutableBytesPtr,Map<PColumn,byte[]>>> entry : mutations.entrySet()) {
            TableRef tableRef = entry.getKey();
            long serverTimeStamp = tableRef.getTimeStamp();
            PTable table = tableRef.getTable();
            // If we're auto committing, we've already validated the schema when we got the ColumnResolver,
            // so no need to do it again here.
            if (!connection.getAutoCommit()) {
                MetaDataMutationResult result = client.updateCache(table.getSchemaName().getString(), table.getTableName().getString());
                long timestamp = result.getMutationTime();
                if (timestamp != QueryConstants.UNSET_TIMESTAMP) {
                    serverTimeStamp = timestamp;
                    if (result.wasUpdated()) {
                        // TODO: use bitset?
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.dropTable(ExecutableDropTableStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.dropIndex(ExecutableDropIndexStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.alterIndex(ExecutableAlterIndexStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.addColumn(ExecutableAddColumnStatement.this);
                }
            };
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.