apache / accumulo-proxy

Apache Accumulo Proxy
https://accumulo.apache.org
Apache License 2.0
9 stars 19 forks source link

Look into using Accumulo maven plugin for Proxy test #7

Open keith-turner opened 5 years ago

keith-turner commented 5 years ago

Currently the proxy uses internal Accumulo code for ITs. It could use the Accumulo maven plugin for running ITs instead. Fluo uses this plugin for its ITs, if anyone is interested I can provide pointers within the Fluo code.

DomGarguilo commented 1 year ago

This seems like a good idea. Some of the internal code that is being used is being removed. For example, see this comment.

if anyone is interested I can provide pointers within the Fluo code.

@keith-turner that would be great in case I get around to working on this at some point.

DomGarguilo commented 1 year ago

@mikewalch, I see you are assigned to this. Are you still looking into this or did you make any progress here?

mikewalch commented 1 year ago

No, I am not looking into this. Feel free to work on it.

keith-turner commented 1 year ago

@DomGarguilo Fluo is multi-module project like Accumulo, its config may be a bit more complicated than you need. So the base pom defines the plugin below

https://github.com/apache/fluo/blob/44e134a9d90685b57fc60a8bcc9a8919e79e4e3b/pom.xml#L294-L333

Then in a module plugin it actives it as follows. It does this in a profile so that when test are not running it does not start miniaccumulo.

https://github.com/apache/fluo/blob/44e134a9d90685b57fc60a8bcc9a8919e79e4e3b/modules/integration-tests/pom.xml#L116-L133

Its important to define the accumulo,hadoop, zk, and thrift versions outside the plugin. The maven plugin is built against Accumulo 2.0 and if this is not done it may use older version in the launched processes.

https://github.com/apache/fluo/blob/44e134a9d90685b57fc60a8bcc9a8919e79e4e3b/modules/integration-tests/pom.xml#L28-L29

The following code gets creates an accumulo client in the test. It uses the client properties file created by mini accumulo that the plugin started.

https://github.com/apache/fluo/blob/44e134a9d90685b57fc60a8bcc9a8919e79e4e3b/modules/integration-tests/src/main/java/org/apache/fluo/integration/ITBase.java#L89

DomGarguilo commented 1 year ago

The maven plugin is built against Accumulo 2.0

I am working towards getting accumulo-proxy to work with 2.1 so if the plugin does not yet support 2.1 then maybe getting that working should be the next step

Edit: I see that the plugin does allow for version 2.1

keith-turner commented 1 year ago

Edit: I see that the plugin does allow for version 2.1

Working with the accumulo-maven-plugin has taught me a lot about Maven. Each plugin has its own classpath independent of the projects classpath. So, the accumulo-maven plugin will do the following.