accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wall <mjw...@apache.org>
Subject Re: scan ignores custom Formatter
Date Wed, 24 Jul 2019 22:26:55 GMT
Did you ever get this working?

Mike

On Wed, Jul 17, 2019 at 12:16 PM mhd wrk <mhdwrkoffice@gmail.com> wrote:

> Basically the sample code (attached) is a copy of DefaultFormatter with
> some modifications to `formatEntry`
>
> On Tue, Jul 16, 2019 at 6:13 PM Michael Wall <mjwall@apache.org> wrote:
>
>> If you are still having issues, can you share your code?
>>
>> Mike
>>
>> On Tue, Jul 16, 2019 at 6:30 PM Christopher <ctubbsii@apache.org> wrote:
>>
>>> It's possible that the shell itself doesn't have it on its class path.
>>> The output of the classpath command is probably the classpath of the
>>> tabletserver you've connected to, not the current local shell process.
>>>
>>> Try `export CLASSPATH=path/to/MyFormatter.jar; bin/accumulo shell ...`
>>>
>>> On Tue, Jul 16, 2019 at 6:01 PM mhd wrk <mhdwrkoffice@gmail.com> wrote:
>>> >
>>> > Yes the jar is on all the tservers and I tried `config`command and
>>> `formatter` commands as alternatives.
>>> > Unfortunately no luck yet.
>>> >
>>> > On Tue, Jul 16, 2019 at 1:30 PM Michael Wall <mjwall@apache.org>
>>> wrote:
>>> >>
>>> >> Couple of thoughts
>>> >>
>>> >> 1 - Are you putting the jar on all the tservers and restarting
>>> everthing?
>>> >> 2 - Have you tried setting the formatter on the table as opposed to
>>> the scan command.  Something like
>>> >> 'config -t mytable -s table.formatter=com.example.MyFormatter'
>>> >>
>>> >> Mike
>>> >>
>>> >> On Tue, Jul 16, 2019 at 2:50 PM mhd wrk <mhdwrkoffice@gmail.com>
>>> wrote:
>>> >>>
>>> >>> I'm trying to use a custom formatter with scan command in Accumulo
>>> shell, but seems that scan simply ignores the custom formatter and uses the
>>> default one!
>>> >>>
>>> >>> The steps I follow are:
>>> >>>
>>> >>> 1- Create custom Formatter by extending
>>> org.apache.accumulo.core.util.format.Formatter
>>> >>>
>>> >>> 2- Copy the jar to ${ACCUMULO_HOME}/lib
>>> >>>
>>> >>> 3- Restart Accumulo to make sure everything is reloaded.
>>> >>>
>>> >>> 4- run `accumulo shell`
>>> >>>
>>> >>> 5- run `classpath` and confirm that the formatter jar is included
in
>>> the path.
>>> >>>
>>> >>> 5- `scan -f 50 -fm com.example.MyFormatter -st -t mytable`
>>> >>>
>>> >>>
>>> >>> Accumulo version: 1.7.2
>>> >>>
>>> >>>
>>> >>> Any known issues?
>>> >>>
>>> >>>
>>> >>> Thanks,
>>> >>>
>>> >>> Mohammad
>>> >>>
>>> >>>
>>> >>>
>>>
>>

Mime
View raw message