Accumulo
  1. Accumulo
  2. ACCUMULO-1989

Can't configure (default) namespace parameters from shell

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      None

      Description

      The shell has a problem with parentheses, this makes it impossible to, e.g. remove an iterator from the (default) namespace.

        Activity

        Hide
        Chris McCubbin added a comment -

        Using the API, I can alter the dafault namespace by passing in an empty string for the namespace, but this is non-intuitive and doesn't match with the description of that namespace's name in the shell.

        Show
        Chris McCubbin added a comment - Using the API, I can alter the dafault namespace by passing in an empty string for the namespace, but this is non-intuitive and doesn't match with the description of that namespace's name in the shell.
        Hide
        Christopher Tubbs added a comment -

        The default namespace is the empty string, similar to java's default package. Namespaces allow tables to be fully qualified. So, tables in the default namespace are fully qualified without a namespace prefix. The problem is, that doesn't show up well in the shell when we list namespaces. The string "(default)" was chosen as a placeholder, because we can't show an empty string (Eclipse, and other IDEs do something similar to show the "(default package)").

        Do you have a suggestion that is more intuitive? One option might be to have a separate flag "--default-namespace" to expose it more obviously.

        Show
        Christopher Tubbs added a comment - The default namespace is the empty string, similar to java's default package. Namespaces allow tables to be fully qualified. So, tables in the default namespace are fully qualified without a namespace prefix. The problem is, that doesn't show up well in the shell when we list namespaces. The string "(default)" was chosen as a placeholder, because we can't show an empty string (Eclipse, and other IDEs do something similar to show the "(default package)"). Do you have a suggestion that is more intuitive? One option might be to have a separate flag "--default-namespace" to expose it more obviously.
        Hide
        Chris McCubbin added a comment -

        Yeah, John Vines and I figured it out after some experimentation. Maybe it could remain as "" if an example is given in the shell help (and maybe in the error message if someone attempts to configure "default") ?

        Show
        Chris McCubbin added a comment - Yeah, John Vines and I figured it out after some experimentation. Maybe it could remain as "" if an example is given in the shell help (and maybe in the error message if someone attempts to configure "default") ?
        Hide
        Christopher Tubbs added a comment -

        Yeah, we can certainly add a quick blurb to the help, and error messages in the case of `-ns "(default)"`.

        Do you know if the shell has problems with parentheses in quotes?

        Show
        Christopher Tubbs added a comment - Yeah, we can certainly add a quick blurb to the help, and error messages in the case of `-ns "(default)"` . Do you know if the shell has problems with parentheses in quotes?
        Hide
        Chris McCubbin added a comment -

        It looks like parens inside quotes is ok:

        root@sqrrl test> deleteiter -ns "(default)" -n "vers" -scan
        2014-01-01 09:46:07,923 [shell.Shell] ERROR: org.apache.accumulo.core.client.NamespaceNotFoundException: Namespace (default) (Id=(default)) does not exist (specified namespace that doesn't exist)
        root@sqrrl test>
        
        Show
        Chris McCubbin added a comment - It looks like parens inside quotes is ok: root@sqrrl test> deleteiter -ns "( default )" -n "vers" -scan 2014-01-01 09:46:07,923 [shell.Shell] ERROR: org.apache.accumulo.core.client.NamespaceNotFoundException: Namespace ( default ) (Id=( default )) does not exist (specified namespace that doesn't exist) root@sqrrl test>
        Hide
        John Vines added a comment -

        perhaps instead of listing it as (default) we list it as an empty string. And in the case of the shell, we put quotes around it. That way it's displaying exactly what it is and how it can be accessed.

        Show
        John Vines added a comment - perhaps instead of listing it as (default) we list it as an empty string. And in the case of the shell, we put quotes around it. That way it's displaying exactly what it is and how it can be accessed.
        Hide
        ASF subversion and git services added a comment -

        Commit a8f154e45d60304827e681d6a74cc7f9dc3aab94 in branch refs/heads/1.6.0-SNAPSHOT from Christopher Tubbs
        [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=a8f154e ]

        ACCUMULO-1989 Use default namespace name explicitly in shell

        Show
        ASF subversion and git services added a comment - Commit a8f154e45d60304827e681d6a74cc7f9dc3aab94 in branch refs/heads/1.6.0-SNAPSHOT from Christopher Tubbs [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=a8f154e ] ACCUMULO-1989 Use default namespace name explicitly in shell
        Hide
        ASF subversion and git services added a comment -

        Commit a8f154e45d60304827e681d6a74cc7f9dc3aab94 in branch refs/heads/master from Christopher Tubbs
        [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=a8f154e ]

        ACCUMULO-1989 Use default namespace name explicitly in shell

        Show
        ASF subversion and git services added a comment - Commit a8f154e45d60304827e681d6a74cc7f9dc3aab94 in branch refs/heads/master from Christopher Tubbs [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=a8f154e ] ACCUMULO-1989 Use default namespace name explicitly in shell

          People

          • Assignee:
            Christopher Tubbs
            Reporter:
            Chris McCubbin
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development