Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C9B11200BAE for ; Tue, 20 Sep 2016 05:49:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C8853160AE2; Tue, 20 Sep 2016 03:49:39 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 75AF2160AE9 for ; Tue, 20 Sep 2016 05:49:37 +0200 (CEST) Received: (qmail 75838 invoked by uid 500); 20 Sep 2016 03:49:36 -0000 Mailing-List: contact commits-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kudu.apache.org Delivered-To: mailing list commits@kudu.apache.org Received: (qmail 74736 invoked by uid 99); 20 Sep 2016 03:49:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2016 03:49:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 414CDDFD9F; Tue, 20 Sep 2016 03:49:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: todd@apache.org To: commits@kudu.apache.org Date: Tue, 20 Sep 2016 03:49:45 -0000 Message-Id: In-Reply-To: <3d82915396b842e4804d2afadc56371a@git.apache.org> References: <3d82915396b842e4804d2afadc56371a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [17/51] [partial] kudu-site git commit: Publish commit(s) from site source repo: ef53d3c Remove 'beta' verbiage from site 9062ee6 Docs and download page for 1.0 archived-at: Tue, 20 Sep 2016 03:49:40 -0000 http://git-wip-us.apache.org/repos/asf/kudu-site/blob/1db5f764/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.AsyncKuduClientBuilder.html ---------------------------------------------------------------------- diff --git a/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.AsyncKuduClientBuilder.html b/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.AsyncKuduClientBuilder.html new file mode 100644 index 0000000..a5180c3 --- /dev/null +++ b/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.AsyncKuduClientBuilder.html @@ -0,0 +1,482 @@ + + + + + + +AsyncKuduClient.AsyncKuduClientBuilder (Kudu 1.0.0 API) + + + + + + + + + + + +
+
org.apache.kudu.client
+

Class AsyncKuduClient.AsyncKuduClientBuilder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.apache.kudu.client.AsyncKuduClient.AsyncKuduClientBuilder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    AsyncKuduClient
    +
    +
    +
    +
    @InterfaceAudience.Public
    + @InterfaceStability.Evolving
    +public static final class AsyncKuduClient.AsyncKuduClientBuilder
    +extends Object
    +
    Builder class to use in order to connect to Kudu. + All the parameters beyond those in the constructors are optional.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AsyncKuduClientBuilder

        +
        public AsyncKuduClientBuilder(String masterAddresses)
        +
        Creates a new builder for a client that will connect to the specified masters.
        +
        +
        Parameters:
        +
        masterAddresses - comma-separated list of "host:port" pairs of the masters
        +
        +
      • +
      + + + +
        +
      • +

        AsyncKuduClientBuilder

        +
        public AsyncKuduClientBuilder(List<String> masterAddresses)
        +
        Creates a new builder for a client that will connect to the specified masters. + +

        Here are some examples of recognized formats: +

          +
        • example.com +
        • example.com:80 +
        • 192.0.2.1 +
        • 192.0.2.1:80 +
        • [2001:db8::1] +
        • [2001:db8::1]:80 +
        • 2001:db8::1 +
        +
        +
        Parameters:
        +
        masterAddresses - list of master addresses
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        defaultAdminOperationTimeoutMs

        +
        public AsyncKuduClient.AsyncKuduClientBuilder defaultAdminOperationTimeoutMs(long timeoutMs)
        +
        Sets the default timeout used for administrative operations (e.g. createTable, deleteTable, + etc). + Optional. + If not provided, defaults to 30s. + A value of 0 disables the timeout.
        +
        +
        Parameters:
        +
        timeoutMs - a timeout in milliseconds
        +
        Returns:
        +
        this builder
        +
        +
      • +
      + + + +
        +
      • +

        defaultOperationTimeoutMs

        +
        public AsyncKuduClient.AsyncKuduClientBuilder defaultOperationTimeoutMs(long timeoutMs)
        +
        Sets the default timeout used for user operations (using sessions and scanners). + Optional. + If not provided, defaults to 30s. + A value of 0 disables the timeout.
        +
        +
        Parameters:
        +
        timeoutMs - a timeout in milliseconds
        +
        Returns:
        +
        this builder
        +
        +
      • +
      + + + +
        +
      • +

        defaultSocketReadTimeoutMs

        +
        public AsyncKuduClient.AsyncKuduClientBuilder defaultSocketReadTimeoutMs(long timeoutMs)
        +
        Sets the default timeout to use when waiting on data from a socket. + Optional. + If not provided, defaults to 10s. + A value of 0 disables the timeout.
        +
        +
        Parameters:
        +
        timeoutMs - a timeout in milliseconds
        +
        Returns:
        +
        this builder
        +
        +
      • +
      + + + +
        +
      • +

        nioExecutors

        +
        public AsyncKuduClient.AsyncKuduClientBuilder nioExecutors(Executor bossExecutor,
        +                                                           Executor workerExecutor)
        +
        Set the executors which will be used for the embedded Netty boss and workers. + Optional. + If not provided, uses a simple cached threadpool. If either argument is null, + then such a thread pool will be used in place of that argument. + Note: executor's max thread number must be greater or equal to corresponding + worker count, or netty cannot start enough threads, and client will get stuck. + If not sure, please just use CachedThreadPool.
        +
      • +
      + + + + + + + +
        +
      • +

        workerCount

        +
        public AsyncKuduClient.AsyncKuduClientBuilder workerCount(int workerCount)
        +
        Set the maximum number of worker threads. + Optional. + If not provided, (2 * the number of available processors) is used.
        +
      • +
      + + + +
        +
      • +

        disableStatistics

        +
        public AsyncKuduClient.AsyncKuduClientBuilder disableStatistics()
        +
        Disable this client's collection of statistics. + Statistics are enabled by default.
        +
        +
        Returns:
        +
        this builder
        +
        +
      • +
      + + + +
        +
      • +

        build

        +
        public AsyncKuduClient build()
        +
        Creates a new client that connects to the masters. + Doesn't block and won't throw an exception if the masters don't exist.
        +
        +
        Returns:
        +
        a new asynchronous Kudu client
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2016 The Apache Software Foundation. All rights reserved.

+ + http://git-wip-us.apache.org/repos/asf/kudu-site/blob/1db5f764/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.html ---------------------------------------------------------------------- diff --git a/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.html b/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.html new file mode 100644 index 0000000..b651255 --- /dev/null +++ b/releases/1.0.0/apidocs/org/apache/kudu/client/AsyncKuduClient.html @@ -0,0 +1,876 @@ + + + + + + +AsyncKuduClient (Kudu 1.0.0 API) + + + + + + + + + + + +
+
org.apache.kudu.client
+

Class AsyncKuduClient

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    AutoCloseable
    +
    +
    +
    +
    @InterfaceAudience.Public
    + @InterfaceStability.Unstable
    +public class AsyncKuduClient
    +extends Object
    +implements AutoCloseable
    +
    A fully asynchronous and thread-safe client for Kudu. +

    + This client should be + instantiated only once. You can use it with any number of tables at the + same time. The only case where you should have multiple instances is when + you want to use multiple different clusters at the same time. +

    + If you play by the rules, this client is completely + thread-safe. Read the documentation carefully to know what the requirements + are for this guarantee to apply. +

    + This client is fully non-blocking, any blocking operation will return a + Deferred instance to which you can attach a Callback chain + that will execute when the asynchronous operation completes. + +

    Note regarding KuduRpc instances passed to this class

    + Every KuduRpc passed to a method of this class should not be + changed or re-used until the Deferred returned by that method + calls you back. Changing or re-using any KuduRpc for + an RPC in flight will lead to unpredictable results and voids + your warranty. + +

    throws clauses

    + None of the asynchronous methods in this API are expected to throw an + exception. But the Deferred object they return to you can carry an + exception that you should handle (using "errbacks", see the javadoc of + Deferred). In order to be able to do proper asynchronous error + handling, you need to know what types of exceptions you're expected to face + in your errbacks. In order to document that, the methods of this API use + javadoc's @throws to spell out the exception types you should + handle in your errback. Asynchronous exceptions will be indicated as such + in the javadoc with "(deferred)".
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        LOG

        +
        public static final org.slf4j.Logger LOG
        +
      • +
      + + + + + + + +
        +
      • +

        EMPTY_ARRAY

        +
        public static final byte[] EMPTY_ARRAY
        +
      • +
      + + + + + + + +
        +
      • +

        DEFAULT_OPERATION_TIMEOUT_MS

        +
        public static final long DEFAULT_OPERATION_TIMEOUT_MS
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        DEFAULT_SOCKET_READ_TIMEOUT_MS

        +
        public static final long DEFAULT_SOCKET_READ_TIMEOUT_MS
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        updateLastPropagatedTimestamp

        +
        public void updateLastPropagatedTimestamp(long lastPropagatedTimestamp)
        +
        Updates the last timestamp received from a server. Used for CLIENT_PROPAGATED + external consistency. This is only publicly visible so that it can be set + on tests, users should generally disregard this method.
        +
        +
        Parameters:
        +
        lastPropagatedTimestamp - the last timestamp received from a server
        +
        +
      • +
      + + + +
        +
      • +

        getLastPropagatedTimestamp

        +
        public long getLastPropagatedTimestamp()
        +
      • +
      + + + +
        +
      • +

        syncClient

        +
        public KuduClient syncClient()
        +
        Returns a synchronous KuduClient which wraps this asynchronous client. + Calling KuduClient.close() on the returned client will close this client. + If this asynchronous client should outlive the returned synchronous client, + then do not close the synchronous client.
        +
        +
        Returns:
        +
        a new synchronous KuduClient
        +
        +
      • +
      + + + +
        +
      • +

        createTable

        +
        public com.stumbleupon.async.Deferred<KuduTable> createTable(String name,
        +                                                             Schema schema,
        +                                                             CreateTableOptions builder)
        +
        Create a table on the cluster with the specified name, schema, and table configurations.
        +
        +
        Parameters:
        +
        name - the table's name
        +
        schema - the table's schema
        +
        builder - a builder containing the table's configurations
        +
        Returns:
        +
        a deferred object to track the progress of the createTable command that gives + an object to communicate with the created table
        +
        +
      • +
      + + + +
        +
      • +

        deleteTable

        +
        public com.stumbleupon.async.Deferred<DeleteTableResponse> deleteTable(String name)
        +
        Delete a table on the cluster with the specified name.
        +
        +
        Parameters:
        +
        name - the table's name
        +
        Returns:
        +
        a deferred object to track the progress of the deleteTable command
        +
        +
      • +
      + + + +
        +
      • +

        alterTable

        +
        public com.stumbleupon.async.Deferred<AlterTableResponse> alterTable(String name,
        +                                                                     AlterTableOptions ato)
        +
        Alter a table on the cluster as specified by the builder. + + When the returned deferred completes it only indicates that the master accepted the alter + command, use isAlterTableDone(String) to know when the alter finishes.
        +
        +
        Parameters:
        +
        name - the table's name, if this is a table rename then the old table name must be passed
        +
        ato - the alter table builder
        +
        Returns:
        +
        a deferred object to track the progress of the alter command
        +
        +
      • +
      + + + +
        +
      • +

        isAlterTableDone

        +
        public com.stumbleupon.async.Deferred<IsAlterTableDoneResponse> isAlterTableDone(String name)
        +
        Helper method that checks and waits until the completion of an alter command. + It will block until the alter command is done or the deadline is reached.
        +
        +
        Parameters:
        +
        name - the table's name, if the table was renamed then that name must be checked against
        +
        Returns:
        +
        a deferred object to track the progress of the isAlterTableDone command
        +
        +
      • +
      + + + +
        +
      • +

        listTabletServers

        +
        public com.stumbleupon.async.Deferred<ListTabletServersResponse> listTabletServers()
        +
        Get the list of running tablet servers.
        +
        +
        Returns:
        +
        a deferred object that yields a list of tablet servers
        +
        +
      • +
      + + + +
        +
      • +

        getTablesList

        +
        public com.stumbleupon.async.Deferred<ListTablesResponse> getTablesList()
        +
        Get the list of all the tables.
        +
        +
        Returns:
        +
        a deferred object that yields a list of all the tables
        +
        +
      • +
      + + + +
        +
      • +

        getTablesList

        +
        public com.stumbleupon.async.Deferred<ListTablesResponse> getTablesList(String nameFilter)
        +
        Get a list of table names. Passing a null filter returns all the tables. When a filter is + specified, it only returns tables that satisfy a substring match.
        +
        +
        Parameters:
        +
        nameFilter - an optional table name filter
        +
        Returns:
        +
        a deferred that yields the list of table names
        +
        +
      • +
      + + + +
        +
      • +

        tableExists

        +
        public com.stumbleupon.async.Deferred<Boolean> tableExists(String name)
        +
        Test if a table exists.
        +
        +
        Parameters:
        +
        name - a non-null table name
        +
        Returns:
        +
        true if the table exists, else false
        +
        +
      • +
      + + + +
        +
      • +

        openTable

        +
        public com.stumbleupon.async.Deferred<KuduTable> openTable(String name)
        +
        Open the table with the given name. If the table was just created, the Deferred will only get + called back when all the tablets have been successfully created.
        +
        +
        Parameters:
        +
        name - table to open
        +
        Returns:
        +
        a KuduTable if the table exists, else a MasterErrorException
        +
        +
      • +
      + + + +
        +
      • +

        getDefaultOperationTimeoutMs

        +
        public long getDefaultOperationTimeoutMs()
        +
        Get the timeout used for operations on sessions and scanners.
        +
        +
        Returns:
        +
        a timeout in milliseconds
        +
        +
      • +
      + + + +
        +
      • +

        getDefaultAdminOperationTimeoutMs

        +
        public long getDefaultAdminOperationTimeoutMs()
        +
        Get the timeout used for admin operations.
        +
        +
        Returns:
        +
        a timeout in milliseconds
        +
        +
      • +
      + + + +
        +
      • +

        getDefaultSocketReadTimeoutMs

        +
        public long getDefaultSocketReadTimeoutMs()
        +
        Get the timeout used when waiting to read data from a socket. Will be triggered when nothing + has been read on a socket connected to a tablet server for timeout milliseconds.
        +
        +
        Returns:
        +
        a timeout in milliseconds
        +
        +
      • +
      + + + +
        +
      • +

        isStatisticsEnabled

        +
        public boolean isStatisticsEnabled()
        +
        Check if statistics collection is enabled for this client.
        +
        +
        Returns:
        +
        true if it is enabled, else false
        +
        +
      • +
      + + + +
        +
      • +

        getStatistics

        +
        public Statistics getStatistics()
        +
        Get the statistics object of this client.
        +
        +
        Returns:
        +
        this client's Statistics object
        +
        Throws:
        +
        IllegalStateException - thrown if statistics collection has been disabled
        +
        +
      • +
      + + + + + + + +
        +
      • +

        newSession

        +
        public AsyncKuduSession newSession()
        +
        Create a new session for interacting with the cluster. + User is responsible for destroying the session object. + This is a fully local operation (no RPCs or blocking).
        +
        +
        Returns:
        +
        a new AsyncKuduSession
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws Exception
        +
        Invokes shutdown() and waits for the configured admin timeout. This method returns + void, so consider invoking shutdown directly if there's a need to handle dangling RPCs.
        +
        +
        Specified by:
        +
        close in interface AutoCloseable
        +
        Throws:
        +
        Exception - if an error happens while closing the connections
        +
        +
      • +
      + + + +
        +
      • +

        shutdown

        +
        public com.stumbleupon.async.Deferred<ArrayList<Void>> shutdown()
        +
        Performs a graceful shutdown of this instance. +

        +

          +
        • Flushes all buffered edits.
        • +
        • Cancels all the other requests.
        • +
        • Terminates all connections.
        • +
        • Releases all other resources.
        • +
        + Not calling this method before losing the last reference to this + instance may result in data loss and other unwanted side effects
        +
        +
        Returns:
        +
        A Deferred, whose callback chain will be invoked once all + of the above have been done. If this callback chain doesn't fail, then + the clean shutdown will be successful, and all the data will be safe on + the Kudu side. In case of a failure (the "errback" is invoked) you will have + to open a new AsyncKuduClient if you want to retry those operations. + The Deferred doesn't actually hold any content.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2016 The Apache Software Foundation. All rights reserved.

+ +