[ https://issues.apache.org/jira/browse/HADOOP-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HADOOP-1789: -------------------------- Attachment: consoletable-2.patch Version 2. Here's commit message: HADOOP-1789 output formatting Adds a factory for table formatters. Commands such as 'select' and 'describe'use it outputting sets. Currently only an ascii table formatter is providedand still todo is config. that would allow other formatters. This asciiformatter removes the index count column (mysql doesn't do this). If columnspecified in query, then column is not emitted in results. If row and columnspecified and only one cell result, then cell is emitted without formatting. If column is known type -- e.g. from the META tables -- then value is properly typed. Fixed limit and number of versions on select. M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestScanner2.java (testRegexForColumnName): Added test of regex in column name qualifier D src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ConsoleTable.java D src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestConsoleTable.java Removed. Replaced by TableFormatter classes. M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java Removed useless logging of exception. M src/contrib/hbase/src/java/org/apache/hadoop/hbase/Shell.java Clean up of summary string. A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/TableFormatterFactory.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/TableFormatter.java Added. M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DescCommand.java M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ShowCommand.java Use new TableFormatter factory. M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/SelectCommand.java Refactored to use new table formatter. Add respect for limit. If column is specified, don't include in results. (toString): If known column, use its type info. (ParsedColumn): Added. Changed getColumns to return one of these. In getColumns, if scanning, use a regex so we only get explicit column if a column family. M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HBaseShell.jj Make it so IDs can't start w/ a number. Change num_versions on select so it expects an equals. M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInterface.java M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HAbstractScanner.java M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegion.java Javadoc about being able to pass regex in column qualifier. > [hbaseshell] output formatting > ------------------------------ > > Key: HADOOP-1789 > URL: https://issues.apache.org/jira/browse/HADOOP-1789 > Project: Hadoop > Issue Type: New Feature > Components: contrib/hbase > Reporter: stack > Priority: Minor > Attachments: console_templates.patch, consoletable-2.patch, > factory.patch > > > hbaseshell currently outputs results using an ascii table. > This issue is about the hbaseshell offering a number of output formats beyond > plain ascii table. It would be grand if output formatting was pluggable so > folks could add new ones as they saw fit. > Currently, there is a painful need for unadorned output so folks can do a > 'select page:content from webrepository where > row="http://apache.com/index.html"; and they get back the page content only. > Other output formats might be: csv, xml, or (x)html > Other related things to consider, but probably not as part of this issue, is > that if we output xml, then we should probably have a sympathetic input > parser for xml files (similar for csv). Let this issue just be about > formatting (another issue can be done to add pluggable input parsers). Where > the output lands should also be done in another issue: i.e. dependent on the > command, output probably default to stdout but folks should be able to > designate an output file (and target filesystem) as in > hdfs://master.hdfsnode.com:8990/output/dump.txt or file:///tmp/dump.txt or > s3://...., etc. > This issue is an outgrowth of HADOOP-1720 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.