HBase
  1. HBase
  2. HBASE-10358

Shell changes for setting consistency per request

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: shell
    • Labels:
      None

      Description

      We can add shell support to set consistency per request.

        Activity

        Hide
        Enis Soztutar added a comment -

        HBASE-10354 already added support for setting Consistency level for gets and scans from Shell.

        get 't1','r6', {CONSISTENCY => "TIMELINE"}
        

        and HBASE-10348 added support for creating a table with region replication:

        create 't1', 'f1', {REGION_REPLICATION => 2}
        

        In this issue, I think we can just add support for displaying whether the incoming results are stale or not from shell.

        Show
        Enis Soztutar added a comment - HBASE-10354 already added support for setting Consistency level for gets and scans from Shell. get 't1','r6', {CONSISTENCY => "TIMELINE" } and HBASE-10348 added support for creating a table with region replication: create 't1', 'f1', {REGION_REPLICATION => 2} In this issue, I think we can just add support for displaying whether the incoming results are stale or not from shell.
        Hide
        yi liang added a comment -

        I attached a screenshot of get command on shell displaying whether the incoming results are stale or not.
        I have several questions and ideas about this jira
        (1) how to show the stale information, where to show the stale information. ??
        (2) I think we need to show the stale info for both get command and scan command
        (3) user need to specify whether to show stale info in get/scan command, the default had better be not showing stale info.

        Show
        yi liang added a comment - I attached a screenshot of get command on shell displaying whether the incoming results are stale or not. I have several questions and ideas about this jira (1) how to show the stale information, where to show the stale information. ?? (2) I think we need to show the stale info for both get command and scan command (3) user need to specify whether to show stale info in get/scan command, the default had better be not showing stale info.
        Hide
        Enis Soztutar added a comment -

        Thanks for picking this up. Feel free to assign the jira to yourself if you have a patch.

        (1) how to show the stale information, where to show the stale information. ??

        Rather than showing the info at the beginning as in the attach screenshot, it should be at the end I think. Something like:

        1 row(s) in 0.2200 seconds, possible stale results.  
        

        (2) I think we need to show the stale info for both get command and scan command

        yes.

        (3) user need to specify whether to show stale info in get/scan command, the default had better be not showing stale info.

        Only have a notification if results are stale, otherwise do not show anything.

        Show
        Enis Soztutar added a comment - Thanks for picking this up. Feel free to assign the jira to yourself if you have a patch. (1) how to show the stale information, where to show the stale information. ?? Rather than showing the info at the beginning as in the attach screenshot, it should be at the end I think. Something like: 1 row(s) in 0.2200 seconds, possible stale results. (2) I think we need to show the stale info for both get command and scan command yes. (3) user need to specify whether to show stale info in get/scan command, the default had better be not showing stale info. Only have a notification if results are stale, otherwise do not show anything.
        Hide
        yi liang added a comment -

        Hi Enis,
        I have one problem about the shell command of concurrency and region replication, hope you can give me some help. when we use command below:
        hbase> get 't1', 'r1',

        {CONSISTENCY => 'TIMELINE', REGION_REPLICA_ID => 2}

        .
        (assume: 't1', {TABLE_ATTRIBUTES =>

        {REGION_REPLICATION => '3'}

        ,

        {NAME => 'f1'}

        and REPLICA_ID=2 is a secondary region server)
        for this command, the table will send this get only to this secondary region server and this secondary region server will handle this get and send back result to client??
        I just want to know is my understanding about this command correct. Thanks

        Show
        yi liang added a comment - Hi Enis, I have one problem about the shell command of concurrency and region replication, hope you can give me some help. when we use command below: hbase> get 't1', 'r1', {CONSISTENCY => 'TIMELINE', REGION_REPLICA_ID => 2} . (assume: 't1', {TABLE_ATTRIBUTES => {REGION_REPLICATION => '3'} , {NAME => 'f1'} and REPLICA_ID=2 is a secondary region server) for this command, the table will send this get only to this secondary region server and this secondary region server will handle this get and send back result to client?? I just want to know is my understanding about this command correct. Thanks
        Hide
        Enis Soztutar added a comment -

        for this command, the table will send this get only to this secondary region server and this secondary region server will handle this get and send back result to client??

        That is true.

        Show
        Enis Soztutar added a comment - for this command, the table will send this get only to this secondary region server and this secondary region server will handle this get and send back result to client?? That is true.
        Hide
        yi liang added a comment -

        hi Enis,
        for the scan command, do you think we need to print stale info for every row if it is stale, like
        ROW COLUMN+CELL
        1 column=f1:c1, timestamp=1462301241126, value=200
        2 column=f1:c1, timestamp=1462308227738, value=100 (possible stale results)
        3 column=f1:c1, timestamp=1462308227738, value=100 (possible stale results)
        2 row(s) in 0.2730 seconds

        or we just print there might be stale rows in this scan like
        1 column=f1:c1, timestamp=1462301241126, value=200
        2 column=f1:c1, timestamp=1462308227738, value=100
        3 column=f1:c1, timestamp=1462308227738, value=100
        2 row(s) in 0.2730 seconds (possible stale results)

        Which one you think is better; for me the first one might be better, cause it is more accurate; but if we put stale for each row, it seems too much things to print and for rows in same region, their stale info are same, and do not need to print every row stale info.

        Show
        yi liang added a comment - hi Enis, for the scan command, do you think we need to print stale info for every row if it is stale, like ROW COLUMN+CELL 1 column=f1:c1, timestamp=1462301241126, value=200 2 column=f1:c1, timestamp=1462308227738, value=100 (possible stale results) 3 column=f1:c1, timestamp=1462308227738, value=100 (possible stale results) 2 row(s) in 0.2730 seconds or we just print there might be stale rows in this scan like 1 column=f1:c1, timestamp=1462301241126, value=200 2 column=f1:c1, timestamp=1462308227738, value=100 3 column=f1:c1, timestamp=1462308227738, value=100 2 row(s) in 0.2730 seconds (possible stale results) Which one you think is better; for me the first one might be better, cause it is more accurate; but if we put stale for each row, it seems too much things to print and for rows in same region, their stale info are same, and do not need to print every row stale info.
        Hide
        Enis Soztutar added a comment -

        Which one you think is better; for me the first one might be better, cause it is more accurate; but if we put stale for each row, it seems too much things to print and for rows in same region, their stale info are same, and do not need to print every row stale info.

        Agreed. Let's do the latter.

        Show
        Enis Soztutar added a comment - Which one you think is better; for me the first one might be better, cause it is more accurate; but if we put stale for each row, it seems too much things to print and for rows in same region, their stale info are same, and do not need to print every row stale info. Agreed. Let's do the latter.

          People

          • Assignee:
            Enis Soztutar
            Reporter:
            Enis Soztutar
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development