[GitHub] keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating docs with Connector builder

2018-02-20 Thread GitBox
keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating 
docs with Connector builder
URL: https://github.com/apache/accumulo-website/pull/56#discussion_r169401543
 
 

 ##
 File path: _docs-2-0/development/client-properties.md
 ##
 @@ -0,0 +1,40 @@
+---
+title: Client Properties
+category: development
+order: 9
+---
+
+
+
+
 
 Review comment:
   Not sure if there is a good way to do this, but it seems like it would be 
nice if this pointed to the javadoc for building a connector... or maybe to the 
clients page.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating docs with Connector builder

2018-02-12 Thread GitBox
keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating 
docs with Connector builder
URL: https://github.com/apache/accumulo-website/pull/56#discussion_r167737967
 
 

 ##
 File path: _docs-2-0/development/client-properties.md
 ##
 @@ -0,0 +1,39 @@
+---
+title: Client Properties
+category: development
+order: 9
+---
+
+
+
+Below are properties set in `accumulo-client.properties` that configure 
Accumulo clients:
+
+| Property | Default value | Description |
 
 Review comment:
   This could be updated with since tag column


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating docs with Connector builder

2018-02-12 Thread GitBox
keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating 
docs with Connector builder
URL: https://github.com/apache/accumulo-website/pull/56#discussion_r167737649
 
 

 ##
 File path: _docs-2-0/administration/in-depth-install.md
 ##
 @@ -294,27 +294,11 @@ will expect the KeyStore in the same location.
 
 ### Client Configuration
 
-In version 1.6.0, Accumulo included a new type of configuration file known as 
a client
-configuration file. One problem with the traditional "site.xml" file that is 
prevalent
-through Hadoop is that it is a single file used by both clients and servers. 
This makes
-it very difficult to protect secrets that are only meant for the server 
processes while
-allowing the clients to connect to the servers.
+Accumulo clients are configured in a different way than Accumulo servers. 
Clients are
+configured when [an Accumulo Connnector is created][client-conn] using Java 
builder methods
+or a `accumulo-client.properties` file containing [client 
properties][client-props].
 
-The client configuration file is a subset of the information stored in 
accumulo-site.xml
-meant only for consumption by clients of Accumulo. By default, Accumulo checks 
a number
-of locations for a client configuration by default:
-
-* `/path/to/accumulo/conf/client.conf`
 
 Review comment:
   If using the new API, will it still look in these locations?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating docs with Connector builder

2018-02-12 Thread GitBox
keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating 
docs with Connector builder
URL: https://github.com/apache/accumulo-website/pull/56#discussion_r167738254
 
 

 ##
 File path: _docs-2-0/getting-started/clients.md
 ##
 @@ -16,92 +16,79 @@ If you are using Maven to create Accumulo client code, add 
the following to your
 
 ```
 
-## Running Client Code
-
-There are multiple ways to run Java code that use Accumulo. Below is a list
-of the different ways to execute client code.
-
-* build and execute an uber jar
-* add `accumulo classpath` to your Java classpath
-* use the `accumulo` command
-* use the `accumulo-util hadoop-jar` command
-
-### Build and execute an uber jar
-
-If you have included `accumulo-core` as dependency in your pom, you can build 
an uber jar
-using the Maven assembly or shade plugin and use it to run Accumulo client 
code. When building
-an uber jar, you should set the versions of any Hadoop dependencies in your 
pom to match the
-version running on your cluster.
-
-### Add 'accumulo classpath' to your Java classpath
-
-To run Accumulo client code using the `java` command, use the `accumulo 
classpath` command 
-to include all of Accumulo's dependencies on your classpath:
-
-java -classpath /path/to/my.jar:/path/to/dep.jar:$(accumulo classpath) 
com.my.Main arg1 arg2
-
-If you would like to review which jars are included, the `accumulo classpath` 
command can
-output a more human readable format using the `-d` option which enables 
debugging:
-
-accumulo classpath -d
-
-### Use the accumulo command
-
-Another option for running your code is to use the Accumulo script which can 
execute a
-main class (if it exists on its classpath):
-
-accumulo com.foo.Client arg1 arg2
-
-While the Accumulo script will add all of Accumulo's dependencies to the 
classpath, you
-will need to add any jars that your create or depend on beyond what Accumulo 
already
-depends on. This can be accomplished by either adding the jars to the 
`lib/ext` directory
-of your Accumulo installation or by adding jars to the CLASSPATH variable 
before calling
-the accumulo command.
-
-export CLASSPATH=/path/to/my.jar:/path/to/dep.jar; accumulo com.foo.Client 
arg1 arg2
-
-### Use the 'accumulo-util hadoop-jar' command
-
-If you are writing map reduce job that accesses Accumulo, then you can use
-`accumulo-util hadoop-jar` to run those jobs. See the [MapReduce 
example][mapred-example]
-for more information.
-
 ## Connecting
 
-All clients must first identify the Accumulo instance to which they will be
-communicating. Code to do this is as follows:
+Before writing Accumulo client code, 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
+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()
+
.usingProperties("/path/to/accumulo-client.properties").build();
+```
+1. Using the builder methods of [Connector]:
+```java
+Connector conn = Connector.builder().forInstance("myinstance", 
"zookeeper1,zookeper2")
+.usingPasswordCredentials("myuser", 
"mypassword").build();
+```
+1. Using a Java Properties object.
+```java
+Properties props = new Properties()
+props.put("instance.name", "myinstance")
+props.put("instance.zookeepers", "zookeeper1,zookeeper2")
+props.put("auth.method", "password")
+props.put("auth.username", "myuser")
+props.put("auth.password", "mypassword")
+Connector conn = Connector.builder().usingProperties(props).build();
+```
+
+If a `accumulo-client.properties` file or a Java Properties object is used to 
create a [Connector], the following
+[client properties][client-props] must be set:
+
+* [instance.name]
+* [instance.zookeepers]
+* [auth.method]
+* [auth.username]
+* [auth.password]
+
+# Authentication
+
+When creating a [Connector], the user must be authenticated using one of the 
following
+implementations of [AuthenticationToken] below:
+
+1. [PasswordToken] is the must commonly used implementation.
+1. [CredentialProviderToken] leverages the Hadoop CredentialProviders (new in 
Hadoop 2.6).
+   For example, the [CredentialProviderToken] can be used in conjunction with 
a Java KeyStore to
+   alleviate passwords stored in cleartext. When stored in HDFS, a single 
KeyStore can be used across
+   an entire instance. Be aware that KeyStores stored on the local filesystem 
must be made available
+   to all nodes in the Accumulo cluster.
+1. [KerberosToken] can be provided to use the authentication provided by 
Kerberos. Using Kerberos
+   requires external setup and additional configuration, but provides a 

[GitHub] keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating docs with Connector builder

2018-02-12 Thread GitBox
keith-turner commented on a change in pull request #56: ACCUMULO-4784 Updating 
docs with Connector builder
URL: https://github.com/apache/accumulo-website/pull/56#discussion_r167737718
 
 

 ##
 File path: _docs-2-0/administration/kerberos.md
 ##
 @@ -342,16 +342,14 @@ Valid starting   Expires  Service 
principal
 
  Configuration
 
-The second thing clients need to do is to set up their client configuration 
file. By
-default, this file is stored in `~/.accumulo/config` or 
`/path/to/accumulo/client.conf`.
-Accumulo utilities also allow you to provide your own copy of this file in any 
location
-using the `--config-file` command line option.
+The second thing clients need to do is to to configure kerberos when an 
Accumulo Connector is
 
 Review comment:
   `to to configure kerberos`


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services