You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by John Vines <vi...@apache.org> on 2014/07/10 19:24:42 UTC

Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

Review request for accumulo.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by Josh Elser <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47586
-----------------------------------------------------------

Ship it!


Minor javadoc fix, otherwise LGTM.


minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment83655>

    Wrong javadoc param


- Josh Elser


On July 10, 2014, 5:24 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 5:24 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by Sean Busbey <se...@manvsbeard.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47593
-----------------------------------------------------------


review board says the second patch doesn't apply, so it won't show a diff.

- Sean Busbey


On July 10, 2014, 6:16 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 6:16 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 10, 2014, 9:13 p.m., Sean Busbey wrote:
> > Overall looks good. Still concerned that it has no check to ensure the existing instance is down prior to starting up the MAC.

Oh right, spaced on that comment. Let me see what I can plumb in.


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47622
-----------------------------------------------------------


On July 10, 2014, 6:43 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 6:43 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by Sean Busbey <se...@manvsbeard.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47622
-----------------------------------------------------------


Overall looks good. Still concerned that it has no check to ensure the existing instance is down prior to starting up the MAC.

- Sean Busbey


On July 10, 2014, 6:43 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 6:43 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57417
-----------------------------------------------------------


The root password passed into the constructor is not used when using an existing instance.

I changed the branch on this Review from 1.6.2 to 1.6 and it started working.   I thought RB was borked.


minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment98116>

    seeing NPE here.  existingInstance is not always set



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment98117>

    possible NPE



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment98118>

    possible NPE


- kturner


On Oct. 20, 2014, 7:56 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 7:56 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On Oct. 20, 2014, 9:02 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java, line 471
> > <https://reviews.apache.org/r/23397/diff/7/?file=726322#file726322line471>
> >
> >     In the IT I wrote, this code is causing problems.  The following situation is occuring.
> >     
> >      * Create MAC to connection to Accumulo instance 1
> >      * Stop ZK1 for Accumulo instance 1
> >      * Create MAC to connection to Accumulo instance 2 (Accumulo instance 2 uses ZK2)
> >     
> >     I think the code gets stuck trying to connect to ZK1, when trying to connection to Accumulo instance 2

So you're expecting this to work with a new zookeeper? Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57431
-----------------------------------------------------------


On Oct. 20, 2014, 8:09 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 8:09 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.

> On Oct. 20, 2014, 9:02 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java, line 471
> > <https://reviews.apache.org/r/23397/diff/7/?file=726322#file726322line471>
> >
> >     In the IT I wrote, this code is causing problems.  The following situation is occuring.
> >     
> >      * Create MAC to connection to Accumulo instance 1
> >      * Stop ZK1 for Accumulo instance 1
> >      * Create MAC to connection to Accumulo instance 2 (Accumulo instance 2 uses ZK2)
> >     
> >     I think the code gets stuck trying to connect to ZK1, when trying to connection to Accumulo instance 2
> 
> John Vines wrote:
>     So you're expecting this to work with a new zookeeper? Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?

Its just what my IT did.  Although I think it makes sense to fix this (could be a follow on issue).  Unless this is fixed, this new functionality can only be used to run one Accumulo instance per Java process(or classloader).  It may also cache instance name??? not sure.   It would be nice to use this functionallity to run existing Accumulo instance A and then run existing Accumulo instance B from the same process.


- kturner


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57431
-----------------------------------------------------------


On Oct. 20, 2014, 8:09 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 8:09 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.

> On Oct. 20, 2014, 9:02 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java, line 471
> > <https://reviews.apache.org/r/23397/diff/7/?file=726322#file726322line471>
> >
> >     In the IT I wrote, this code is causing problems.  The following situation is occuring.
> >     
> >      * Create MAC to connection to Accumulo instance 1
> >      * Stop ZK1 for Accumulo instance 1
> >      * Create MAC to connection to Accumulo instance 2 (Accumulo instance 2 uses ZK2)
> >     
> >     I think the code gets stuck trying to connect to ZK1, when trying to connection to Accumulo instance 2
> 
> John Vines wrote:
>     So you're expecting this to work with a new zookeeper? Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?
> 
> kturner wrote:
>     Its just what my IT did.  Although I think it makes sense to fix this (could be a follow on issue).  Unless this is fixed, this new functionality can only be used to run one Accumulo instance per Java process(or classloader).  It may also cache instance name??? not sure.   It would be nice to use this functionallity to run existing Accumulo instance A and then run existing Accumulo instance B from the same process.

> Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?

To clarify, my IT created ZK1 and Accumulo instance 1 in testA.  Then testB created ZK2 and instance 2 in the same process.  When I tried to run this second instance it hung.  I think it was trying to connect to the old ZK.   So I am not using a new ZK with an existing Accumulo instance.


- kturner


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57431
-----------------------------------------------------------


On Oct. 20, 2014, 8:09 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 8:09 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.

> On Oct. 20, 2014, 9:02 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java, line 471
> > <https://reviews.apache.org/r/23397/diff/7/?file=726322#file726322line471>
> >
> >     In the IT I wrote, this code is causing problems.  The following situation is occuring.
> >     
> >      * Create MAC to connection to Accumulo instance 1
> >      * Stop ZK1 for Accumulo instance 1
> >      * Create MAC to connection to Accumulo instance 2 (Accumulo instance 2 uses ZK2)
> >     
> >     I think the code gets stuck trying to connect to ZK1, when trying to connection to Accumulo instance 2
> 
> John Vines wrote:
>     So you're expecting this to work with a new zookeeper? Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?
> 
> kturner wrote:
>     Its just what my IT did.  Although I think it makes sense to fix this (could be a follow on issue).  Unless this is fixed, this new functionality can only be used to run one Accumulo instance per Java process(or classloader).  It may also cache instance name??? not sure.   It would be nice to use this functionallity to run existing Accumulo instance A and then run existing Accumulo instance B from the same process.
> 
> kturner wrote:
>     > Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?
>     
>     To clarify, my IT created ZK1 and Accumulo instance 1 in testA.  Then testB created ZK2 and instance 2 in the same process.  When I tried to run this second instance it hung.  I think it was trying to connect to the old ZK.   So I am not using a new ZK with an existing Accumulo instance.

I outlined the situation incorrectly.  Should have said the following.


 * Create MAC1 to run Accumulo instance 1
 * Stop MAC1
 * Stop ZK1 for Accumulo instance 1
 * Create MAC2 to run Accumulo instance 2 (Accumulo instance 2 uses ZK2)


- kturner


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57431
-----------------------------------------------------------


On Oct. 20, 2014, 8:09 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 8:09 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On Oct. 20, 2014, 9:02 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java, line 471
> > <https://reviews.apache.org/r/23397/diff/7/?file=726322#file726322line471>
> >
> >     In the IT I wrote, this code is causing problems.  The following situation is occuring.
> >     
> >      * Create MAC to connection to Accumulo instance 1
> >      * Stop ZK1 for Accumulo instance 1
> >      * Create MAC to connection to Accumulo instance 2 (Accumulo instance 2 uses ZK2)
> >     
> >     I think the code gets stuck trying to connect to ZK1, when trying to connection to Accumulo instance 2
> 
> John Vines wrote:
>     So you're expecting this to work with a new zookeeper? Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?
> 
> kturner wrote:
>     Its just what my IT did.  Although I think it makes sense to fix this (could be a follow on issue).  Unless this is fixed, this new functionality can only be used to run one Accumulo instance per Java process(or classloader).  It may also cache instance name??? not sure.   It would be nice to use this functionallity to run existing Accumulo instance A and then run existing Accumulo instance B from the same process.
> 
> kturner wrote:
>     > Standard Accumulo doesn't work with a new ZK instance, why would you expect the MAC equivalent to?
>     
>     To clarify, my IT created ZK1 and Accumulo instance 1 in testA.  Then testB created ZK2 and instance 2 in the same process.  When I tried to run this second instance it hung.  I think it was trying to connect to the old ZK.   So I am not using a new ZK with an existing Accumulo instance.
> 
> kturner wrote:
>     I outlined the situation incorrectly.  Should have said the following.
>     
>     
>      * Create MAC1 to run Accumulo instance 1
>      * Stop MAC1
>      * Stop ZK1 for Accumulo instance 1
>      * Create MAC2 to run Accumulo instance 2 (Accumulo instance 2 uses ZK2)

The short explanation here is that this is using singleton items for parsing some information. Specifically, this is HdfsZooinstance, ZooReaderWriter, etc. I have resolved these issues in my latest patch, but I'm not sure how welcoming people would be to added methods for clearing out singleton instances.


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57431
-----------------------------------------------------------


On Oct. 21, 2014, 12:32 a.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2014, 12:32 a.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java 3508164 
>   server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
>   server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java 435591d 
>   test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57431
-----------------------------------------------------------



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
<https://reviews.apache.org/r/23397/#comment98131>

    In the IT I wrote, this code is causing problems.  The following situation is occuring.
    
     * Create MAC to connection to Accumulo instance 1
     * Stop ZK1 for Accumulo instance 1
     * Create MAC to connection to Accumulo instance 2 (Accumulo instance 2 uses ZK2)
    
    I think the code gets stuck trying to connect to ZK1, when trying to connection to Accumulo instance 2


- kturner


On Oct. 20, 2014, 8:09 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 8:09 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57636
-----------------------------------------------------------



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
<https://reviews.apache.org/r/23397/#comment98435>

    if instance name is null at this point, should probably bail



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment98438>

    seems like false should be passed to constructor?



test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java
<https://reviews.apache.org/r/23397/#comment98439>

    woohoo, can remove this.


- kturner


On Oct. 21, 2014, 6:35 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2014, 6:35 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java d536f42 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java e261faa 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
>   server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java 8ddeb4f 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
>   test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57653
-----------------------------------------------------------

Ship it!


Ship It!

- kturner


On Oct. 21, 2014, 8:11 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2014, 8:11 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java c901768 
>   core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java d536f42 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java e261faa 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
>   server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java 8ddeb4f 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
>   test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 21, 2014, 8:11 p.m.)


Review request for accumulo.


Changes
-------

Fixing another Configuration plumbing issue and adding some info statements


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java c901768 
  core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java d536f42 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java e261faa 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
  server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
  server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java 8ddeb4f 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
  test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57641
-----------------------------------------------------------

Ship it!


Ship It!

- kturner


On Oct. 21, 2014, 7:15 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2014, 7:15 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java d536f42 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java e261faa 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
>   server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java 8ddeb4f 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
>   test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 21, 2014, 7:15 p.m.)


Review request for accumulo.


Changes
-------

Addressing latest batch of Keith reported errors


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java d536f42 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java e261faa 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
  server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
  server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java 8ddeb4f 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
  test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 21, 2014, 6:35 p.m.)


Review request for accumulo.


Changes
-------

Fully revised version based on Keith's suggestions which longer does any sort of manipulation of static utilities.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java d536f42 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java e261faa 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
  server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
  server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java 8ddeb4f 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
  test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review57582
-----------------------------------------------------------



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
<https://reviews.apache.org/r/23397/#comment98367>

    I looked into this code, its full of landmines.  It calls VolumeManager.get() which uses static config for accumulo-site.xml (which may not be the accumulo-site you want).   Want to avoid this.  Want to make sure that all info is obtained using your accumulo-site.xml and your haddop config.
    
    Below I put together some code that I think mostly does this.  Tried to make sure the instance id is obtained from filesystem using your config and that zookeeper is obtained using your config.
    
    ```java
    Configuration config = new Configuration(false);
    config.addResource(yourAccumuloSite);
    
    ConfigurationCopy cc = new ConfigurationCopy(config);
    try {
      fs = VolumeManagerImpl.get(cc);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    Path instanceIdPath = Accumulo.getAccumuloInstanceIdPath(fs);
    
    //TODO this method calls CahcedConfig.getInstance(), should create a method where hadoop config is passed in
    String instanceIdFromFile = ZooUtil.getInstanceIDFromHdfs(instanceIdPath, cc);
    
    zrw = new ZooReaderWriterFactory.getZooReaderWriter(cc.get(Property.INSTANCE_ZK_HOST), (int) cc.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT),
                cc.get(Property.INSTANCE_SECRET));
    
    String rootPath = ZooUtil.getRoot(instanceIdFromFile);
    //TODO pass this root path to isAccumuloOffline
    
    ```


- kturner


On Oct. 21, 2014, 12:32 a.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2014, 12:32 a.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java 3508164 
>   server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
>   server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java 435591d 
>   test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 21, 2014, 12:32 a.m.)


Review request for accumulo.


Changes
-------

Rolling in Keith's tests and fixing them by adding methods for clearing out singletons


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
  server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java 3508164 
  server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java 50dec57 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
  server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java 435591d 
  test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 20, 2014, 8:09 p.m.)


Review request for accumulo.


Changes
-------

Addressing NPE concerns


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 20, 2014, 7:56 p.m.)


Review request for accumulo.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 20, 2014, 4:51 p.m.)


Review request for accumulo.


Changes
-------

Trying to get a functional patch


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 15, 2014, 10:12 p.m.)


Review request for accumulo.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 12f3ad2 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 07c5742 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 4878967 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 15, 2014, 10:10 p.m.)


Review request for accumulo.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


File Attachments
----------------

0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
  https://reviews.apache.org/media/uploaded/files/2014/10/15/1ee9c409-65de-4a44-a86e-e905b4593a8f__0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
  https://reviews.apache.org/media/uploaded/files/2014/10/15/d38c6150-4320-41e1-8495-b42d050ddc93__0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 15, 2014, 10:10 p.m.)


Review request for accumulo.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


File Attachments (updated)
----------------

0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
  https://reviews.apache.org/media/uploaded/files/2014/10/15/1ee9c409-65de-4a44-a86e-e905b4593a8f__0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
  https://reviews.apache.org/media/uploaded/files/2014/10/15/d38c6150-4320-41e1-8495-b42d050ddc93__0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated Oct. 15, 2014, 10:09 p.m.)


Review request for accumulo.


Changes
-------

Updated for 1.6.2, added some additional checking


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description (updated)
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing (updated)
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


File Attachments (updated)
----------------

0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
  https://reviews.apache.org/media/uploaded/files/2014/10/15/1ee9c409-65de-4a44-a86e-e905b4593a8f__0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.
> 
> John Vines wrote:
>     I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work
> 
> kturner wrote:
>     I was going to try writing a test and see how it went, however the patch does not apply to 1.6 branch for me.   Below is the md5 of the patch I tried.
>     
>     md5sum 0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
>     68738fd6c45ce47a27ac21ae7d69f5f9  0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
> 
> John Vines wrote:
>     That's an old version. I uploaded an updated version last week
>     b2de90dfebf8ade591bd71b2e1ab36fe  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch

Uploaded again with one that git ams just fine. RB uses the patch command so it's failing here.


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On Oct. 20, 2014, 4:51 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 4:51 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.
> 
> John Vines wrote:
>     I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work
> 
> kturner wrote:
>     I was going to try writing a test and see how it went, however the patch does not apply to 1.6 branch for me.   Below is the md5 of the patch I tried.
>     
>     md5sum 0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
>     68738fd6c45ce47a27ac21ae7d69f5f9  0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch

That's an old version. I uploaded an updated version last week
b2de90dfebf8ade591bd71b2e1ab36fe  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On Oct. 15, 2014, 10:12 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2014, 10:12 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 12f3ad2 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 07c5742 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 4878967 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 259
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line259>
> >
> >     Would be nice to document how this method relates to setSiteConfig() and setZookeeperPort() 
> >     
> >     I assume if calling this and setZookeeperPort() that the zookeeper port set would be ignored, but I have not look.  
> >     
> >     Calling useExistingInstance and then setSiteConfig() could gum things up.

Addressed with strict checking


> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.

I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On July 10, 2014, 10:48 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 10:48 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.
> 
> John Vines wrote:
>     I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work
> 
> kturner wrote:
>     I was going to try writing a test and see how it went, however the patch does not apply to 1.6 branch for me.   Below is the md5 of the patch I tried.
>     
>     md5sum 0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
>     68738fd6c45ce47a27ac21ae7d69f5f9  0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
> 
> John Vines wrote:
>     That's an old version. I uploaded an updated version last week
>     b2de90dfebf8ade591bd71b2e1ab36fe  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch
> 
> John Vines wrote:
>     Uploaded again with one that git ams just fine. RB uses the patch command so it's failing here.
> 
> kturner wrote:
>     I downloaded the patch and it applied, however I am seeing a different md5.
>     f8ff459e213d255f9a36698f8a6d7376  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch

That matches the new uploaded version


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On Oct. 20, 2014, 4:51 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 4:51 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.
> 
> John Vines wrote:
>     I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work
> 
> kturner wrote:
>     I was going to try writing a test and see how it went, however the patch does not apply to 1.6 branch for me.   Below is the md5 of the patch I tried.
>     
>     md5sum 0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
>     68738fd6c45ce47a27ac21ae7d69f5f9  0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
> 
> John Vines wrote:
>     That's an old version. I uploaded an updated version last week
>     b2de90dfebf8ade591bd71b2e1ab36fe  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch
> 
> John Vines wrote:
>     Uploaded again with one that git ams just fine. RB uses the patch command so it's failing here.
> 
> kturner wrote:
>     I downloaded the patch and it applied, however I am seeing a different md5.
>     f8ff459e213d255f9a36698f8a6d7376  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch
> 
> John Vines wrote:
>     That matches the new uploaded version
> 
> kturner wrote:
>     I wrote a test for this feature.  One of the test hangs because of an issue, I will comment on the problem.
>     
>     https://github.com/keith-turner/accumulo/commit/79ad30129c5dc14e005843a9b992fa5dc24e4311

oh, that commit is in the following branch on my Accumulo fork if you want to clone.  The branch has an older version of your patch.  Would probably need the latest patch to avoid NPEs

https://github.com/keith-turner/accumulo/tree/ACCUMULO-2984


- kturner


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On Oct. 20, 2014, 8:09 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 8:09 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.
> 
> John Vines wrote:
>     I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work
> 
> kturner wrote:
>     I was going to try writing a test and see how it went, however the patch does not apply to 1.6 branch for me.   Below is the md5 of the patch I tried.
>     
>     md5sum 0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
>     68738fd6c45ce47a27ac21ae7d69f5f9  0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
> 
> John Vines wrote:
>     That's an old version. I uploaded an updated version last week
>     b2de90dfebf8ade591bd71b2e1ab36fe  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch
> 
> John Vines wrote:
>     Uploaded again with one that git ams just fine. RB uses the patch command so it's failing here.

I downloaded the patch and it applied, however I am seeing a different md5.
f8ff459e213d255f9a36698f8a6d7376  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch


- kturner


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On Oct. 20, 2014, 4:51 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 4:51 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.
> 
> John Vines wrote:
>     I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work
> 
> kturner wrote:
>     I was going to try writing a test and see how it went, however the patch does not apply to 1.6 branch for me.   Below is the md5 of the patch I tried.
>     
>     md5sum 0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
>     68738fd6c45ce47a27ac21ae7d69f5f9  0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
> 
> John Vines wrote:
>     That's an old version. I uploaded an updated version last week
>     b2de90dfebf8ade591bd71b2e1ab36fe  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch
> 
> John Vines wrote:
>     Uploaded again with one that git ams just fine. RB uses the patch command so it's failing here.
> 
> kturner wrote:
>     I downloaded the patch and it applied, however I am seeing a different md5.
>     f8ff459e213d255f9a36698f8a6d7376  0001-ACCUMULO-2984-adding-ability-to-run-MAC-against-a-pe.patch
> 
> John Vines wrote:
>     That matches the new uploaded version

I wrote a test for this feature.  One of the test hangs because of an issue, I will comment on the problem.

https://github.com/keith-turner/accumulo/commit/79ad30129c5dc14e005843a9b992fa5dc24e4311


- kturner


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On Oct. 20, 2014, 8:09 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 8:09 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 9b65e7d 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 5d8501e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java e9ad045 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.

> On July 15, 2014, 6:58 p.m., kturner wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 267
> > <https://reviews.apache.org/r/23397/diff/4/?file=628112#file628112line267>
> >
> >     A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.
> 
> John Vines wrote:
>     I'm gonna be blunt - this is really really hard and I think it can be punted to a ticket for future work

I was going to try writing a test and see how it went, however the patch does not apply to 1.6 branch for me.   Below is the md5 of the patch I tried.

md5sum 0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch
68738fd6c45ce47a27ac21ae7d69f5f9  0001-ACCUMULO-2984-support-running-MAC-against-a-real-acc.patch


- kturner


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------


On Oct. 15, 2014, 10:12 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2014, 10:12 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 12f3ad2 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 07c5742 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 4878967 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by ke...@deenlo.com.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47792
-----------------------------------------------------------



minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
<https://reviews.apache.org/r/23397/#comment83993>

    Would be nice to document how this method relates to setSiteConfig() and setZookeeperPort() 
    
    I assume if calling this and setZookeeperPort() that the zookeeper port set would be ignored, but I have not look.  
    
    Calling useExistingInstance and then setSiteConfig() could gum things up.  



minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
<https://reviews.apache.org/r/23397/#comment83997>

    A test to prevent regressions would be really nice.  Might be able to start a mini instance, stop it, use internal exec methods to start a zookeeper, and then point another mac to the old mini instance.


- kturner


On July 10, 2014, 10:48 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 10:48 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 11, 2014, 5:38 p.m., Josh Elser wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java, line 389
> > <https://reviews.apache.org/r/23397/diff/4/?file=628113#file628113line389>
> >
> >     Would be good to add a note here about changing this to fs.defaultFS once we fully move to hadoop-2 only.
> >     
> >     (no need to roll a new patch, IMO)

I replaced it with CommonConfigurationKeys.FS_DEFAULT_NAME_KEY


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47661
-----------------------------------------------------------


On July 10, 2014, 10:48 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 10:48 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by Josh Elser <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47661
-----------------------------------------------------------

Ship it!


Two minor things, LGTM though.


minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
<https://reviews.apache.org/r/23397/#comment83771>

    Would be good to add a note here about changing this to fs.defaultFS once we fully move to hadoop-2 only.
    
    (no need to roll a new patch, IMO)



server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java
<https://reviews.apache.org/r/23397/#comment83772>

    We have the actual host information in ZK here. It would likely be useful on a cluster of size >1 to have the actual nodes that contain running processes logged.
    
    I'll create a ticket to do this.


- Josh Elser


On July 10, 2014, 10:48 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 10:48 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
>   server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated July 10, 2014, 10:48 p.m.)


Review request for accumulo.


Changes
-------

Revised file with attempts to check to see if accumulo is already running, as well as fixes to javadoc whitespaces in altered files (so others don't make my mistake from copy/pasting)


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java 50bb14a 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
  server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java PRE-CREATION 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated July 10, 2014, 6:43 p.m.)


Review request for accumulo.


Changes
-------

Apparently the one generated that ignored whitespace was busted.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated July 10, 2014, 6:43 p.m.)


Review request for accumulo.


Changes
-------

Apparently the one generated that ignored whitespace was busted.


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/
-----------------------------------------------------------

(Updated July 10, 2014, 6:16 p.m.)


Review request for accumulo.


Changes
-------

Addressing javadoc concerns, 2944 merge issues, and generated ignoring whitespace


Bugs: ACCUMULO-2984
    https://issues.apache.org/jira/browse/ACCUMULO-2984


Repository: accumulo


Description
-------

Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
Provides flagging to prevent uneccessary folder creation
Provides flagging to prevent running zookeeper and initializing


Diffs (updated)
-----

  core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
  minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 

Diff: https://reviews.apache.org/r/23397/diff/


Testing
-------

Ran the following test code-
public class TestMACWithRealInstance {
  public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
    MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
    macConfig.setNumTservers(2);
    macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
    macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
    MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
    mac.start();
    System.out.println("Started");
    mac.getConnector("root", "secret").tableOperations().create("macCreated");
    System.out.println("Stopping");
    mac.stop();
    System.out.println("Stopped");
  }
}
Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985

After running this, I validated that the table was created in the real accumulo instance via zkCli


Thanks,

John Vines


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by Sean Busbey <se...@manvsbeard.com>.

> On July 10, 2014, 5:50 p.m., Sean Busbey wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 259
> > <https://reviews.apache.org/r/23397/diff/1/?file=627812#file627812line259>
> >
> >     nit: whitesapce
> 
> John Vines wrote:
>     Are these nits for the patch or nits about whitespace changes? Because for whatever reason this file is not properly formatted and if we're stripping all whitespace changes from patches, I don't know when we expect these to be addressed. If we're going to nit everyone over whitespace issues outside the scope of the patch, we're going to discourage people from auto formatting files they're editing, which could result in even worse formatting nits being introduced in their code.
> 
> Josh Elser wrote:
>     The eclipse formatter, at least how I have it set up with the configuration we have set, will be adding these extra spaces.

The nits are about the whitespace being left in the changes the patch introduces. Generally I only push back on formatting errors related to the scope of the patch.

Yes, there is a bug in the eclipse formatter that causes it to incorrectly miss the end of line whitespace in javadoc sections it populates.


- Sean


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47585
-----------------------------------------------------------


On July 10, 2014, 6:16 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 6:16 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 10, 2014, 5:50 p.m., Sean Busbey wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 259
> > <https://reviews.apache.org/r/23397/diff/1/?file=627812#file627812line259>
> >
> >     nit: whitesapce
> 
> John Vines wrote:
>     Are these nits for the patch or nits about whitespace changes? Because for whatever reason this file is not properly formatted and if we're stripping all whitespace changes from patches, I don't know when we expect these to be addressed. If we're going to nit everyone over whitespace issues outside the scope of the patch, we're going to discourage people from auto formatting files they're editing, which could result in even worse formatting nits being introduced in their code.
> 
> Josh Elser wrote:
>     The eclipse formatter, at least how I have it set up with the configuration we have set, will be adding these extra spaces.
> 
> Sean Busbey wrote:
>     The nits are about the whitespace being left in the changes the patch introduces. Generally I only push back on formatting errors related to the scope of the patch.
>     
>     Yes, there is a bug in the eclipse formatter that causes it to incorrectly miss the end of line whitespace in javadoc sections it populates.

Ahh! That's been fixed, but I copied other javadoc comments to use as a template so it didn't get addressed. Should probably see if there's any work about adding that to the formatter.


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47585
-----------------------------------------------------------


On July 10, 2014, 6:43 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 6:43 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by John Vines <vi...@apache.org>.

> On July 10, 2014, 5:50 p.m., Sean Busbey wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 259
> > <https://reviews.apache.org/r/23397/diff/1/?file=627812#file627812line259>
> >
> >     nit: whitesapce

Are these nits for the patch or nits about whitespace changes? Because for whatever reason this file is not properly formatted and if we're stripping all whitespace changes from patches, I don't know when we expect these to be addressed. If we're going to nit everyone over whitespace issues outside the scope of the patch, we're going to discourage people from auto formatting files they're editing, which could result in even worse formatting nits being introduced in their code.


> On July 10, 2014, 5:50 p.m., Sean Busbey wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java, lines 267-268
> > <https://reviews.apache.org/r/23397/diff/1/?file=627813#file627813line267>
> >
> >     nit: can we skip this change in line wrapping?
> >     
> >     I think this change set is already likely to conflict with ACCUMULO-2944 and I'd like to minimize it.

Addressing the two 2944 conflict items with r2


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47585
-----------------------------------------------------------


On July 10, 2014, 5:24 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 5:24 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by Josh Elser <jo...@gmail.com>.

> On July 10, 2014, 5:50 p.m., Sean Busbey wrote:
> > minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java, line 259
> > <https://reviews.apache.org/r/23397/diff/1/?file=627812#file627812line259>
> >
> >     nit: whitesapce
> 
> John Vines wrote:
>     Are these nits for the patch or nits about whitespace changes? Because for whatever reason this file is not properly formatted and if we're stripping all whitespace changes from patches, I don't know when we expect these to be addressed. If we're going to nit everyone over whitespace issues outside the scope of the patch, we're going to discourage people from auto formatting files they're editing, which could result in even worse formatting nits being introduced in their code.

The eclipse formatter, at least how I have it set up with the configuration we have set, will be adding these extra spaces.


- Josh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47585
-----------------------------------------------------------


On July 10, 2014, 6:16 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 6:16 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>


Re: Review Request 23397: ACCUMULO-2984 Support Running MAC against a standard instance

Posted by Sean Busbey <se...@manvsbeard.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23397/#review47585
-----------------------------------------------------------


I don't see a check to ensure that the MAC isn't getting started against an existing instance while that instance is still running. Can you please add one? Something similar to what the offline tools use should suffice.


core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
<https://reviews.apache.org/r/23397/#comment83652>

    add a javadoc please.



minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
<https://reviews.apache.org/r/23397/#comment83653>

    nit: whitesapce



minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
<https://reviews.apache.org/r/23397/#comment83654>

    nit whitespace



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
<https://reviews.apache.org/r/23397/#comment83656>

    nit: can we skip this change in line wrapping?
    
    I think this change set is already likely to conflict with ACCUMULO-2944 and I'd like to minimize it.



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
<https://reviews.apache.org/r/23397/#comment83657>

    nit: can we skip this line wrap change?
    
    I'm pretty sure this is going to conflict with ACCUMULO-2944 and I'd like to minimize it.



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment83658>

    nit: whitespace



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment83659>

    nit: whitespace



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment83660>

    nit: whitespace



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment83661>

    nit: whitespace



minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
<https://reviews.apache.org/r/23397/#comment83662>

    nit: whitespace


- Sean Busbey


On July 10, 2014, 5:24 p.m., John Vines wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23397/
> -----------------------------------------------------------
> 
> (Updated July 10, 2014, 5:24 p.m.)
> 
> 
> Review request for accumulo.
> 
> 
> Bugs: ACCUMULO-2984
>     https://issues.apache.org/jira/browse/ACCUMULO-2984
> 
> 
> Repository: accumulo
> 
> 
> Description
> -------
> 
> Adds a change to SiteConfiguration to allow external setting of the xml configuration file.
> Adds a single method to MiniAccumuloConfig which allows a user to point to accumulo-site.xml and HADOOP_CONF_DIR to use for pulling out requisite instance information
> Clusters configurations into those required to run inside a MAC-sized footprint and those which are for arbitrary naming schemes for MAC
> Provides flagging to prevent uneccessary folder creation
> Provides flagging to prevent running zookeeper and initializing
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java 4c7d95e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java be80f85 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java 977968e 
>   minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java 337eda0 
> 
> Diff: https://reviews.apache.org/r/23397/diff/
> 
> 
> Testing
> -------
> 
> Ran the following test code-
> public class TestMACWithRealInstance {
>   public static void main(String args[]) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, InterruptedException {
>     MiniAccumuloConfig macConfig = new MiniAccumuloConfig(new File("/tmp/mac"), "secret");
>     macConfig.setNumTservers(2);
>     macConfig.setMemory(ServerType.TABLET_SERVER, 2, MemoryUnit.GIGABYTE);
>     macConfig.useExistingInstance(new File("/usr/lib/accumulo/conf/accumulo-site.xml"), new File("/usr/lib/hadoop/conf"));
>     MiniAccumuloCluster mac = new MiniAccumuloCluster(macConfig);
>     mac.start();
>     System.out.println("Started");
>     mac.getConnector("root", "secret").tableOperations().create("macCreated");
>     System.out.println("Stopping");
>     mac.stop();
>     System.out.println("Stopped");
>   }
> }
> Which runs fine, except stopping issues which seem to be related to ACCUMULO-2985
> 
> After running this, I validated that the table was created in the real accumulo instance via zkCli
> 
> 
> Thanks,
> 
> John Vines
> 
>