Accumulo
  1. Accumulo
  2. ACCUMULO-249

Create org.apache.accumulo.server.util.Flush program to simplify examples.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: scripts
    • Labels:
      None

      Description

      The README.bloom file has the following step:

      Below the table is flushed, look at the monitor page and wait for the flush to
      complete.

      $ ./bin/accumulo shell -u username -p password
      username@instance> flush -t bloom_test
      Flush of table bloom_test initiated...
      username@instance> exit

      It would be nice to avoid the shell by using:

      bin/accumulo org.apache.accumulo.server.util.Flush -u username -p password -t bloom_test

      Of course, all flush options should be supported. If no table name was provided, could all tables be flushed? And can a comma-delimited list of table be handled?

        Activity

        Hide
        Eric Newton added a comment -

        I've been wanting the '-e' option for a long time, anyhow.

        Show
        Eric Newton added a comment - I've been wanting the '-e' option for a long time, anyhow.
        Hide
        Keith Turner added a comment -

        The shell currently supports the following.

        echo 'flush -w -t bloom' | accumulo shell -u user -p pass

        The example could be changed to this.

        Show
        Keith Turner added a comment - The shell currently supports the following. echo 'flush -w -t bloom' | accumulo shell -u user -p pass The example could be changed to this.
        Hide
        Keith Turner added a comment -

        Could add a -e option to the shell, then could do the following.

        accumulo shell -u user -p pass -e 'flush -w -t bloom'

        Show
        Keith Turner added a comment - Could add a -e option to the shell, then could do the following. accumulo shell -u user -p pass -e 'flush -w -t bloom'
        Hide
        Eric Newton added a comment -

        Oh, now that I look at the README.bloom, I see that it does most of its work using the command line. I like your idea for creating a Flush utility.

        Show
        Eric Newton added a comment - Oh, now that I look at the README.bloom, I see that it does most of its work using the command line. I like your idea for creating a Flush utility.
        Hide
        Eric Newton added a comment -

        Starting in 1.4, you can wait on the flush:

        username@instance> flush -t bloom_test -w
        05 09:51:17,019 [shell.Shell] INFO : Flush of table bloom_test completed.
        username@instance> 
        

        And you can use regular expressions to specify the tables:

        username@instance > flush -p .* -w
        05 09:52:02,037 [shell.Shell] INFO : Flush of table !METADATA completed.
        05 09:52:02,038 [shell.Shell] INFO :   May need to flush !METADATA table multiple times.
        05 09:52:02,038 [shell.Shell] INFO :   Flushing !METADATA causes writes to itself and
        05 09:52:02,038 [shell.Shell] INFO :   minor compactions, which also cause writes to itself.
        05 09:52:02,038 [shell.Shell] INFO :   Check the monitor web page and give it time to settle.
        05 09:52:02,107 [shell.Shell] INFO : Flush of table bloom_test completed.
        

        I'll update the READMEs.

        Show
        Eric Newton added a comment - Starting in 1.4, you can wait on the flush: username@instance> flush -t bloom_test -w 05 09:51:17,019 [shell.Shell] INFO : Flush of table bloom_test completed. username@instance> And you can use regular expressions to specify the tables: username@instance > flush -p .* -w 05 09:52:02,037 [shell.Shell] INFO : Flush of table !METADATA completed. 05 09:52:02,038 [shell.Shell] INFO : May need to flush !METADATA table multiple times. 05 09:52:02,038 [shell.Shell] INFO : Flushing !METADATA causes writes to itself and 05 09:52:02,038 [shell.Shell] INFO : minor compactions, which also cause writes to itself. 05 09:52:02,038 [shell.Shell] INFO : Check the monitor web page and give it time to settle. 05 09:52:02,107 [shell.Shell] INFO : Flush of table bloom_test completed. I'll update the READMEs.
        Hide
        David Medinets added a comment -

        If this improvement makes sense, then I'd also like to see util classes developed for setauths and createtable. Probably every command in the accumulo shell should be replicated in the util class?

        Show
        David Medinets added a comment - If this improvement makes sense, then I'd also like to see util classes developed for setauths and createtable. Probably every command in the accumulo shell should be replicated in the util class?

          People

          • Assignee:
            Eric Newton
            Reporter:
            David Medinets
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development