accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwa...@apache.org
Subject [accumulo-website] branch master updated: Accumulo 2.0 updates (#111)
Date Wed, 03 Oct 2018 22:08:42 GMT
This is an automated email from the ASF dual-hosted git repository.

mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-website.git


The following commit(s) were added to refs/heads/master by this push:
     new ccf16c6  Accumulo 2.0 updates (#111)
ccf16c6 is described below

commit ccf16c6aa711bc6a1946d1fcf15abe238316de05
Author: Mike Walch <mwalch@apache.org>
AuthorDate: Wed Oct 3 18:08:37 2018 -0400

    Accumulo 2.0 updates (#111)
    
    * Renamed Connector to AccumuloClient
    * Fixed Kerberos DelegationToken docs for M/R
---
 _docs-2-0/administration/caching.md                |  2 +-
 .../administration/configuration-management.md     |  4 +-
 _docs-2-0/administration/in-depth-install.md       | 14 +++---
 _docs-2-0/administration/kerberos.md               | 50 +++++++---------------
 _docs-2-0/administration/ssl.md                    |  6 +--
 _docs-2-0/administration/tracing.md                |  2 +-
 _docs-2-0/development/development_tools.md         |  3 +-
 _docs-2-0/development/mapreduce.md                 |  8 ++--
 _docs-2-0/development/proxy.md                     |  4 +-
 _docs-2-0/development/security.md                  |  8 ++--
 _docs-2-0/getting-started/clients.md               | 41 +++++++++---------
 _docs-2-0/getting-started/table_configuration.md   |  9 ++--
 _docs-2-0/getting-started/table_design.md          |  8 ++--
 13 files changed, 72 insertions(+), 87 deletions(-)

diff --git a/_docs-2-0/administration/caching.md b/_docs-2-0/administration/caching.md
index c04bc6e..81636e2 100644
--- a/_docs-2-0/administration/caching.md
+++ b/_docs-2-0/administration/caching.md
@@ -31,7 +31,7 @@ setting {% plink table.cache.block.enable %} to `true` in the shell:
 Or programmatically using [TableOperations.setProperty()][tableops]:
 
 ```java
-conn.tableOperations().setProperty("mytable", "table.cache.block.enable", "true");
+client.tableOperations().setProperty("mytable", "table.cache.block.enable", "true");
 ```
 
 The size of the index and data block caches (which are shared by all tablets of tablet server)
can be changed from
diff --git a/_docs-2-0/administration/configuration-management.md b/_docs-2-0/administration/configuration-management.md
index 6e71304..e8826c2 100644
--- a/_docs-2-0/administration/configuration-management.md
+++ b/_docs-2-0/administration/configuration-management.md
@@ -8,7 +8,7 @@ Configuration is managed differently for Accumulo clients and servers.
 
 ## Client Configuration
 
-Accumulo clients are configured when [the Connector is built][client-conn] using builder
methods or `accumulo-client.properties`
+[Accumulo clients][accumulo-client] are created using builder methods or `accumulo-client.properties`
 which is configured using [client properties][client-props].
 
 ## Server Configuration
@@ -112,6 +112,6 @@ default  | table.compaction.minor.logs.threshold ..... | 3
 default  | table.failures.ignore ..................... | false
 ```
 
-[client-conn]: {% durl getting-started/clients#connecting %}
+[accumulo-client]: {% durl getting-started/clients#creating-an-accumulo-client %}
 [client-props]: {% durl development/client-properties %}
 [props]: {% durl administration/properties %}
diff --git a/_docs-2-0/administration/in-depth-install.md b/_docs-2-0/administration/in-depth-install.md
index 1cb4501..a135005 100644
--- a/_docs-2-0/administration/in-depth-install.md
+++ b/_docs-2-0/administration/in-depth-install.md
@@ -108,11 +108,11 @@ the Monitor which is configured by `log4j-monitor.properties`. All Accumulo
comm
 Accumulo needs to know where to find the software it depends on. Edit accumulo-env.sh
 and specify the following:
 
-1. Enter the location of Hadoop for `$HADOOP_PREFIX`
+1. Enter the location of Hadoop for `$HADOOP_HOME`
 2. Enter the location of ZooKeeper for `$ZOOKEEPER_HOME`
 3. Optionally, choose a different location for Accumulo logs using `$ACCUMULO_LOG_DIR`
 
-Accumulo uses `HADOOP_PREFIX` and `ZOOKEEPER_HOME` to locate Hadoop and Zookeeper jars
+Accumulo uses `HADOOP_HOME` and `ZOOKEEPER_HOME` to locate Hadoop and Zookeeper jars
 and add them the `CLASSPATH` variable. If you are running a vendor-specific release of Hadoop
 or Zookeeper, you may need to change how your `CLASSPATH` is built in `accumulo-env.sh`.
If
 Accumulo has problems later on finding jars, run `accumulo classpath -d` to debug and print
@@ -291,9 +291,9 @@ will expect the KeyStore in the same location.
 
 ### Client Configuration
 
-Accumulo clients are configured in a different way than Accumulo servers. Clients are
-configured when [an Accumulo Connector is created][client-conn] using Java builder methods
-or a `accumulo-client.properties` file containing [client properties][client-props].
+Accumulo clients are configured in a different way than Accumulo servers. [Accumulo clients
+are created][accumulo-client] using Java builder methods or a `accumulo-client.properties`
+file containing [client properties][client-props].
 
 ### Custom Table Tags
 
@@ -315,7 +315,7 @@ Accumulo builds its Java classpath in `accumulo-env.sh`.  After an Accumulo
appl
 specified in the deprecated [general.classpaths] property. Additionally, Accumulo will load
classes from the locations specified in the
 [general.dynamic.classpaths] property and will monitor and reload them if they change. The
reloading feature is useful during the development
 and testing of iterators as new or modified iterator classes can be deployed to Accumulo
without having to restart the database.
-/
+
 Accumulo also has an alternate configuration for the classloader which will allow it to load
classes from remote locations. This mechanism
 uses Apache Commons VFS which enables locations such as http and hdfs to be used. This alternate
configuration also uses the
 [general.classpaths] property in the same manner described above. It differs in that you
need to configure the
@@ -686,5 +686,5 @@ mailing lists at https://accumulo.apache.org for more info.
 [general.classpaths]: {% purl general.classpaths %}
 [general.dynamic.classpaths]: {% purl general.dynamic.classpaths %}
 [general.vfs.classpaths]: {% purl general.vfs.classpaths %}
-[client-conn]: {% durl getting-started/clients#connecting %}
+[accumulo-client]: {% durl getting-started/clients#creating-an-accumulo-client %}
 [client-props]: {% durl development/client-properties %}
diff --git a/_docs-2-0/administration/kerberos.md b/_docs-2-0/administration/kerberos.md
index f0759a2..abc1196 100644
--- a/_docs-2-0/administration/kerberos.md
+++ b/_docs-2-0/administration/kerberos.md
@@ -328,8 +328,8 @@ Valid starting       Expires              Service principal
 
 #### Configuration
 
-The second thing clients need to do is to configure kerberos when an Accumulo Connector is
-created.  This can be done using Connector builder methods or by setting the properties
+The second thing clients need to do is to configure kerberos when an Accumulo client is
+created.  This can be done using client builder methods or by setting the properties
 below in `accumulo-client.properties` which can be provided to Accumulo utilities using
 the `--config-file` command line option.
 
@@ -378,52 +378,32 @@ $
 
 #### DelegationTokens with MapReduce
 
-To use DelegationTokens in a custom MapReduce job, the call to `setConnectorInfo()` method
-on `AccumuloInputFormat` or `AccumuloOutputFormat` should be the only necessary change. Instead
-of providing an instance of a `KerberosToken`, the user must call `SecurityOperations.getDelegationToken`
-using a `Connector` obtained with that `KerberosToken`, and pass the `DelegationToken` to
-`setConnectorInfo` instead of the `KerberosToken`. It is expected that the user launching
-the MapReduce job is already logged in via Kerberos via a keytab or via a locally-cached
-Kerberos ticket-granting-ticket (TGT).
+To use DelegationTokens in a custom MapReduce job, the user should create an `AccumuloClient`
+using a `KerberosToken` and use it to call `SecurityOperations.getDelegationToken`. The
+`DelegationToken` that is created can then be used to create a new client using this
+delegation token.  The `ClientInfo` object from this client can be passed into the MapReduce
+job. It is expected that the user launching the MapReduce job is already logged in via Kerberos
+via a keytab or via a locally-cached Kerberos ticket-granting-ticket (TGT).
 
 ```java
-Instance instance = getInstance();
 KerberosToken kt = new KerberosToken();
-Connector conn = instance.getConnector(principal, kt);
-DelegationToken dt = conn.securityOperations().getDelegationToken();
+AccumuloClient client = Accumulo.newClient().forInstance("myinstance", "zoo1,zoo2")
+                .usingToken(principal, kt).build();
+DelegationToken dt = client.securityOperations().getDelegationToken();
+AccumuloClient client2 = client.changeUser(principal, dt);
+ClientInfo info2 = client2.info();
 
 // Reading from Accumulo
-AccumuloInputFormat.setConnectorInfo(job, principal, dt);
+AccumuloInputFormat.setClientInfo(job, info2);
 
 // Writing to Accumulo
-AccumuloOutputFormat.setConnectorInfo(job, principal, dt);
+AccumuloOutputFormat.setClientInfo(job, info2);
 ```
 
-If the user passes a `KerberosToken` to the `setConnectorInfo` method, the implementation
will
-attempt to obtain a `DelegationToken` automatically, but this does have limitations
-based on the other MapReduce configuration methods already called and permissions granted
-to the calling user. It is best for the user to acquire the DelegationToken on their own
-and provide it directly to `setConnectorInfo`.
-
 Users must have the `DELEGATION_TOKEN` system permission to call the `getDelegationToken`
 method. The obtained delegation token is only valid for the requesting user for a period
 of time dependent on Accumulo's configuration (`general.delegation.token.lifetime`).
 
-It is also possible to obtain and use `DelegationToken`s outside of the context
-of MapReduce.
-
-```java
-String principal = "user@REALM";
-Instance instance = getInstance();
-Connector connector = instance.getConnector(principal, new KerberosToken());
-DelegationToken delegationToken = connector.securityOperations().getDelegationToken();
-
-Connector dtConnector = instance.getConnector(principal, delegationToken);
-```
-
-Use of the `dtConnector` will perform each operation as the original user, but without
-their Kerberos credentials.
-
 For the duration of validity of the `DelegationToken`, the user *must* take the necessary
precautions
 to protect the `DelegationToken` from prying eyes as it can be used by any user on any host
to impersonate
 the user who requested the `DelegationToken`. YARN ensures that passing the delegation token
from the client
diff --git a/_docs-2-0/administration/ssl.md b/_docs-2-0/administration/ssl.md
index 20dbf12..9a7f972 100644
--- a/_docs-2-0/administration/ssl.md
+++ b/_docs-2-0/administration/ssl.md
@@ -47,8 +47,8 @@ their own certificate.
 ## Client configuration
 
 To establish a connection to Accumulo servers, each client must also have
-special configuration. This is typically accomplished by [creating Accumulo
-clients][clients] using `accumulo-client.properties` and setting the following
+special configuration. This is typically accomplished by [creating an Accumulo
+client][clients] using `accumulo-client.properties` and setting the following
 the properties to connect to an Accumulo instance using SSL:
 
 * {% plink -c ssl.enabled %} to `true`
@@ -121,4 +121,4 @@ keytool -import -trustcacerts -alias server-crt -file server.crt -keystore
serve
 The `server.jks` file is the Java keystore containing the certificate for a given host. The
above
 methods are equivalent whether the certificate is generate for an Accumulo server or a client.
 
-[clients]: {{ page.docs_baseurl }}/getting-started/clients#connecting
+[clients]: {{ page.docs_baseurl }}/getting-started/clients#creating-an-accumulo-client
diff --git a/_docs-2-0/administration/tracing.md b/_docs-2-0/administration/tracing.md
index 5ef0a8c..37d64c4 100644
--- a/_docs-2-0/administration/tracing.md
+++ b/_docs-2-0/administration/tracing.md
@@ -172,7 +172,7 @@ import org.apache.htrace.Trace;
 import org.apache.htrace.TraceScope;
 ...
 TraceScope scope = Trace.startSpan("Client Scan", Sampler.ALWAYS);
-BatchScanner scanner = conn.createBatchScanner(...);
+BatchScanner scanner = client.createBatchScanner(...);
 // Configure your scanner
 for (Entry entry : scanner) {
 }
diff --git a/_docs-2-0/development/development_tools.md b/_docs-2-0/development/development_tools.md
index b677429..cccf70d 100644
--- a/_docs-2-0/development/development_tools.md
+++ b/_docs-2-0/development/development_tools.md
@@ -37,8 +37,7 @@ mac.start();
 Once we have our mini cluster running, we will want to interact with the Accumulo client
API:
 
 ```java
-Connector conn = Connector.builder().forInstance(mac.getInstanceName(), mac.getZooKeepers())
-                    .usingPassword("root", "password").build();
+AccumuloClient client = mac.getAccumuloClient("root", new PasswordToken("password"));
 ```
 
 Upon completion of our development code, we will want to shutdown our MiniAccumuloCluster:
diff --git a/_docs-2-0/development/mapreduce.md b/_docs-2-0/development/mapreduce.md
index a72b1c5..6028531 100644
--- a/_docs-2-0/development/mapreduce.md
+++ b/_docs-2-0/development/mapreduce.md
@@ -54,9 +54,9 @@ The following code shows how to set up Accumulo
 
 ```java
 Job job = new Job(getConf());
-ConnectionInfo info = Connector.builder().forInstance("myinstance","zoo1,zoo2")
+ClientInfo info = Accumulo.newClient().forInstance("myinstance","zoo1,zoo2")
                         .usingPassword("user", "passwd").info()
-AccumuloInputFormat.setConnectionInfo(job, info);
+AccumuloInputFormat.setClientInfo(job, info);
 AccumuloInputFormat.setInputTableName(job, table);
 AccumuloInputFormat.setScanAuthorizations(job, new Authorizations());
 ```
@@ -154,9 +154,9 @@ class MyMapper extends Mapper<Key,Value,WritableComparable,Writable>
{
 ## AccumuloOutputFormat options
 
 ```java
-ConnectionInfo info = Connector.builder().forInstance("myinstance","zoo1,zoo2")
+ClientInfo info = Accumulo.newClient().forInstance("myinstance","zoo1,zoo2")
                         .usingPassword("user", "passwd").info()
-AccumuloOutputFormat.setConnectionInfo(job, info);
+AccumuloOutputFormat.setClientInfo(job, info);
 AccumuloOutputFormat.setDefaultTableName(job, "mytable");
 ```
 
diff --git a/_docs-2-0/development/proxy.md b/_docs-2-0/development/proxy.md
index 1aa700b..1a5f598 100644
--- a/_docs-2-0/development/proxy.md
+++ b/_docs-2-0/development/proxy.md
@@ -6,7 +6,7 @@ order: 3
 
 The proxy API allows the interaction with Accumulo with languages other than Java.
 A proxy server is provided in the codebase and a client can further be generated.
-The proxy API can also be used instead of the traditional [Connector] class to
+The proxy API can also be used instead of the traditional [AccumuloClient] class to
 provide a single TCP port in which clients can be securely routed through a firewall,
 without requiring access to all tablet servers in the cluster.
 
@@ -374,5 +374,5 @@ if __name__ == "__main__":
     main()
 ```
 
-[Connector]: {% jurl org.apache.accumulo.core.client.Connector %}
+[AccumuloClient]: {% jurl org.apache.accumulo.core.client.AccumuloClient %}
 [tutorial]: https://thrift.apache.org/tutorial/
diff --git a/_docs-2-0/development/security.md b/_docs-2-0/development/security.md
index 247c150..c12bd7c 100644
--- a/_docs-2-0/development/security.md
+++ b/_docs-2-0/development/security.md
@@ -83,7 +83,7 @@ results sent back to the client.
 // user possesses both admin and system level access
 Authorizations auths = new Authorizations("admin","system");
 
-Scanner s = connector.createScanner("table", auths);
+Scanner s = client.createScanner("table", auths);
 ```
 
 ## User Authorizations
@@ -115,13 +115,14 @@ Accumulo has a pluggable security mechanism. It can be broken into three
actions
 authorization, and permission handling.
 
 Authentication verifies the identity of a user. In Accumulo, authentication occurs when
-the `usingToken'` method of the [Connector] builder is called with a principal (i.e username)
+the `usingToken'` method of the [AccumuloClient] builder is called with a principal (i.e
username)
 and an [AuthenticationToken] which is an interface with multiple implementations. The most
 common implementation is [PasswordToken] which is the default authentication method for Accumulo
 out of the box.
 
 ```java
-Connector conn = Connector.builder().forInstance("myinstance", "zookeeper1,zookeper2")
+AccumuloClient client = Accumulo.newClient()
+                    .forInstance("myinstance", "zookeeper1,zookeper2")
                     .usingToken("user", new PasswordToken("passwd")).build();
 ```
 
@@ -176,6 +177,7 @@ Typically, the query services layer sits between Accumulo and user workstations.
 [Mutation]: {% jurl org.apache.accumulo.core.data.Mutation %}
 [ColumnVisibility]: {% jurl org.apache.accumulo.core.security.ColumnVisibility %}
 [Scanner]: {% jurl org.apache.accumulo.core.client.Scanner %}
+[AccumuloClient]: {% jurl org.apache.accumulo.core.client.AccumuloClient %}
 [BatchScanner]: {% jurl org.apache.accumulo.core.client.BatchScanner %}
 [Authorizations]: {% jurl org.apache.accumulo.core.security.Authorizations %}
 [SecurityOperations]: {% jurl org.apache.accumulo.core.client.admin.SecurityOperations %}
diff --git a/_docs-2-0/getting-started/clients.md b/_docs-2-0/getting-started/clients.md
index 0811c71..c07d326 100644
--- a/_docs-2-0/getting-started/clients.md
+++ b/_docs-2-0/getting-started/clients.md
@@ -6,7 +6,7 @@ order: 3
 
 ## Creating Client Code
 
-If you are using Maven to create Accumulo client code, add the following to your pom:
+If you are using Maven to create Accumulo client code, add the following dependency to your
pom:
 
 ```xml
 <dependency>
@@ -20,26 +20,27 @@ When writing code that uses Accumulo, only use the [Accumulo Public API](/api).
 The `accumulo-core` artifact includes implementation code that falls outside the
 Public API and should be avoided.
 
-## Connecting
+## Creating an Accumulo Client
 
-Before writing Accumulo client code, you will need the following information.
+Before creating an Accumulo client, you will need the following information:
 
  * Accumulo instance name
  * Zookeeper connection string
  * Accumulo username & password
 
-The [Connector] object is the main entry point for Accumulo clients. It can be created using
one
+The [AccumuloClient] object is the main entry point for Accumulo clients. It can be created
using one
 of the following methods:
 
 1. Using the `accumulo-client.properties` file (a template can be found in the `conf/` directory
    of the tarball distribution):
     ```java
-    Connector conn = Connector.builder()
+    AccumuloClient client = Accumulo.newClient()
                         .usingProperties("/path/to/accumulo-client.properties").build();
     ```
-1. Using the builder methods of [Connector]:
+1. Using the builder methods of [AccumuloClient]:
     ```java
-    Connector conn = Connector.builder().forInstance("myinstance", "zookeeper1,zookeper2")
+    AccumuloClient client = Accumulo.newClient()
+                        .forInstance("myinstance", "zookeeper1,zookeeper2")
                         .usingPassword("myuser", "mypassword").build();
     ```
 1. Using a Java Properties object.
@@ -50,10 +51,10 @@ of the following methods:
     props.put("auth.type", "password")
     props.put("auth.principal", "myuser")
     props.put("auth.token", "mypassword")
-    Connector conn = Connector.builder().usingProperties(props).build();
+    AccumuloClient client = Accumulo.newClient().usingProperties(props).build();
     ```
 
-If a `accumulo-client.properties` file or a Java Properties object is used to create a [Connector],
the following
+If a `accumulo-client.properties` file or a Java Properties object is used to create a [AccumuloClient],
the following
 [client properties][client-props] must be set:
 
 * [instance.name] - Name of Accumulo instance to connect to
@@ -81,7 +82,7 @@ auth.token = AAAAGh+LCAAAAAAAAAArTk0uSi0BAOXoolwGAAAA
 
 # Authentication
 
-When creating a [Connector], the user must be authenticated using one of the following
+When creating a [AccumuloClient], the user must be authenticated using one of the following
 implementations of [AuthenticationToken] below:
 
 1. [PasswordToken] is the must commonly used implementation.
@@ -96,17 +97,18 @@ implementations of [AuthenticationToken] below:
 
     ```java
     KerberosToken token = new KerberosToken();
-    Connector conn = Connector.builder().forInstance("myinstance", "zookeeper1,zookeper2")
+    AccumuloClient client = Accumulo.newClient()
+                        .forInstance("myinstance", "zookeeper1,zookeper2")
                         .usingToken(token.getPrincipal(), token).build();
     ```
 
 ## Writing Data
 
-With a [Connector] created, it can be used to create objects (like the [BatchWriter]) for
+With a [AccumuloClient] created, it can be used to create objects (like the [BatchWriter])
for
 reading and writing from Accumulo:
 
 ```java
-BatchWriter writer = conn.createBatchWriter("table");
+BatchWriter writer = client.createBatchWriter("table");
 ```
 
 Data is written to Accumulo by creating [Mutation] objects that represent all the
@@ -144,7 +146,7 @@ Mutations are added to a BatchWriter thus:
 BatchWriterConfig config = new BatchWriterConfig();
 config.setMaxMemory(10000000L); // bytes available to batchwriter for buffering mutations
 
-BatchWriter writer = conn.createBatchWriter("table", config)
+BatchWriter writer = client.createBatchWriter("table", config)
 writer.addMutation(mutation);
 writer.close();
 ```
@@ -195,7 +197,7 @@ These levels are:
 Durability can be set in multiple ways:
 
 1. The default durability of a table can be set in the Accumulo shell
-2. When creating a [Connector], the default durability can be overridden using `withBatchWriterConfig()`
+2. When creating a [AccumuloClient], the default durability can be overridden using `withBatchWriterConfig()`
    or by setting [batch.writer.durability] in `accumulo-client.properties`.
 3. When a BatchWriter or ConditionalWriter is created, the durability settings above will
be overridden
    by the `BatchWriterConfig` that is passed in.
@@ -206,8 +208,7 @@ Durability can be set in multiple ways:
     // This is DANGEROUS:
     cfg.setDurability(Durability.NONE);
 
-    Connection conn = ... ;
-    BatchWriter bw = conn.createBatchWriter(table, cfg);
+    BatchWriter bw = client.createBatchWriter(table, cfg);
     ```
 
 ## Reading Data
@@ -225,7 +226,7 @@ to return a subset of the columns available.
 // specify which visibilities we are allowed to see
 Authorizations auths = new Authorizations("public");
 
-Scanner scan = conn.createScanner("table", auths);
+Scanner scan = client.createScanner("table", auths);
 scan.setRange(new Range("harry","john"));
 scan.fetchColumnFamily(new Text("attributes"));
 
@@ -274,7 +275,7 @@ TabletServers in parallel.
 ArrayList<Range> ranges = new ArrayList<Range>();
 // populate list of ranges ...
 
-BatchScanner bscan = conn.createBatchScanner("table", auths, 10);
+BatchScanner bscan = client.createBatchScanner("table", auths, 10);
 bscan.setRanges(ranges);
 bscan.fetchColumnFamily("attributes");
 
@@ -348,7 +349,7 @@ This page covers Accumulo client basics.  Below are links to additional
document
 * [Proxy] - Documentation for interacting with Accumulo using non-Java languages through
a proxy server
 * [MapReduce] - Documentation for reading and writing to Accumulo using MapReduce.
 
-[Connector]: {% jurl org.apache.accumulo.core.client.Connector %}
+[AccumuloClient]: {% jurl org.apache.accumulo.core.client.AccumuloClient %}
 [client-props]: {% durl development/client-properties %}
 [auth.type]: {% purl -c auth.type %}
 [auth.principal]: {% purl -c auth.principal %}
diff --git a/_docs-2-0/getting-started/table_configuration.md b/_docs-2-0/getting-started/table_configuration.md
index b2cbb56..21a648e 100644
--- a/_docs-2-0/getting-started/table_configuration.md
+++ b/_docs-2-0/getting-started/table_configuration.md
@@ -34,7 +34,8 @@ programmatically as follows:
 ### Managing Locality Groups via the Client API
 
 ```java
-Connector conn;
+AccumuloClient client = Accumulo.newClient()
+                        .usingProperties("/path/to/accumulo-client.properties").build();
 
 HashMap<String,Set<Text>> localityGroups = new HashMap<String, Set<Text>>();
 
@@ -49,10 +50,10 @@ contentColumns.add(new Text("images"));
 localityGroups.put("metadata", metadataColumns);
 localityGroups.put("content", contentColumns);
 
-conn.tableOperations().setLocalityGroups("mytable", localityGroups);
+client.tableOperations().setLocalityGroups("mytable", localityGroups);
 
 // existing locality groups can be obtained as follows
-Map<String, Set<Text>> groups = conn.tableOperations().getLocalityGroups("mytable");
+Map<String, Set<Text>> groups = client.tableOperations().getLocalityGroups("mytable");
 ```
 
 The assignment of Column Families to Locality Groups can be changed at any time. The
@@ -196,7 +197,7 @@ VersioningIterator with the -ndi option in the shell. Also the Java API
 has the following method
 
 ```java
-connector.tableOperations.create(String tableName, boolean limitVersion);
+client.tableOperations.create(String tableName, boolean limitVersion);
 ```
 
 #### Logical Time
diff --git a/_docs-2-0/getting-started/table_design.md b/_docs-2-0/getting-started/table_design.md
index 87b747d..babb9af 100644
--- a/_docs-2-0/getting-started/table_design.md
+++ b/_docs-2-0/getting-started/table_design.md
@@ -33,8 +33,10 @@ We could then retrieve any of the columns for a specific userid by specifying
th
 userid as the range of a scanner and fetching specific columns:
 
 ```java
+AccumuloClient client = Accumulo.newClient()
+                        .usingProperties("/path/to/accumulo-client.properties").build();
 Range r = new Range(userid, userid); // single row
-Scanner s = conn.createScanner("userdata", auths);
+Scanner s = client.createScanner("userdata", auths);
 s.setRange(r);
 s.fetchColumnFamily(new Text("age"));
 
@@ -165,7 +167,7 @@ for (Entry<Key,Value> entry : indexScanner) {
 }
 
 // now we pass the set of rowIDs to the batch scanner to retrieve them
-BatchScanner bscan = conn.createBatchScanner("table", auths, 10);
+BatchScanner bscan = client.createBatchScanner("table", auths, 10);
 bscan.setRanges(matchingRows);
 bscan.fetchColumnFamily(new Text("attributes"));
 
@@ -277,7 +279,7 @@ BatchScanner within user query code as follows:
 ```java
 Text[] terms = {new Text("the"), new Text("white"), new Text("house")};
 
-BatchScanner bscan = conn.createBatchScanner(table, auths, 20);
+BatchScanner bscan = client.createBatchScanner(table, auths, 20);
 
 IteratorSetting iter = new IteratorSetting(20, "ii", IntersectingIterator.class);
 IntersectingIterator.setColumnFamilies(iter, terms);


Mime
View raw message