accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sukant Hajra" <qn2b6c2...@snkmail.com>
Subject Is Connector thread-safe?
Date Wed, 21 Mar 2012 00:02:13 GMT
Hi,

I realized that I should probably double check what Cloudbase/Accumulo
abstractions are thread-safe, and which are not.

We'd like to avoid creating resources redundantly.  Consider the following
builder code:

    public static Connector newConnector(String instanceName,
                                         String zookeepers,
                                         String userName,
                                         String password) throws CBSecurityException,
                                                                 CBException {
        return new ConnectorImpl(
                new ZooKeeperInstance(instanceName, zookeepers),
                userName,
                password.getBytes());
    }

Based on the parameter list, this seems like Connector might be a thread-safe
object. . .  and that the Scanners, Writers, and Deleters created by it are the
non-threadsafe objects to be used in isolated contexts.

Is this correct?  By the way, if I missed something in the documentation,
please point me to it, I'm eager to read more documentation on this project.

Also, I opted not to the subscribe to the list just yet, so please cc me on any
responses (I'll try to check the archives for responses too).

-Sukant

Mime
View raw message