[ 
https://issues.apache.org/jira/browse/HBASE-16044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15347364#comment-15347364
 ] 

Appy commented on HBASE-16044:
------------------------------

Since these changes are only in master and branch-1, i think it keeps our 
operational compat promise. [~stack], you still think we should change the 
format back? Or does the below plan sounds good?

At some point, we might want to define our guidelines more strictly, something 
like the following: (based on discussion with Sean)
- non-interactive output: will keep operational compatibility across 
maintenance release. From our perspective, it'll basically dump the output from 
HBaseAdmin directly. (So in a way, it'll be like a admin client for shell).
- interactive output: free-form and can change any time. The only good reason 
for this is, formatted shell output is like text-UI, and UI are not good for 
programatic interface. And think about it, what if we want to add a christmas 
easter egg in 2.0 :-).


> Fix 'hbase shell' output parsing in bash scripts
> ------------------------------------------------
>
>                 Key: HBASE-16044
>                 URL: https://issues.apache.org/jira/browse/HBASE-16044
>             Project: HBase
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 2.0.0
>            Reporter: Samir Ahmic
>            Assignee: Samir Ahmic
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> In some of our bash scripts we are piping command in hbase shell and then 
> parsing response to define variables.  Since 'hbase shell' output format is 
> changed we are picking wrong values from output Here is example form 
> gracful_stop.sh:
> {code}
> HBASE_BALANCER_STATE=$(echo 'balance_switch false' | "$bin"/hbase --config 
> "${HBASE_CONF_DIR}" shell | tail -3 | head -1)
> {code}
> this will return "balance_switch true" instead of previous balancer  state.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to