[
https://issues.apache.org/jira/browse/HBASE-13981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14615940#comment-14615940
]
Apekshit Sharma commented on HBASE-13981:
-----------------------------------------
[~gliptak] not sure why ATTRIBUTE_SEPERATOR_CONF_KEY or "attributes.seperator"
are there. Since ImportTsv is @InterfaceAudience.Public, we can not simply
delete it but can mark it @Deprecated.
Patch looks good. Just last two things.
1.
{code}
- public final static String ATTRIBUTE_SEPERATOR_CONF_KEY =
"attributes.seperator";
+ public final static String ATTRIBUTE_SEPARATOR_CONF_KEY =
"attributes.separator";
...
- final static String DEFAULT_ATTRIBUTES_SEPERATOR = "=>";
- final static String DEFAULT_MULTIPLE_ATTRIBUTES_SEPERATOR = ",";
+ final static String DEFAULT_ATTRIBUTES_SEPARATOR = "=>";
+ final static String DEFAULT_MULTIPLE_ATTRIBUTES_SEPARATOR = ",";
{code}
Again, since ImportTsv is @InterfaceAudience.Public (read more about this
[here|http://hbase.apache.org/book.html#hbase.client.api.surface]), we can not
simply change the name. The right thing to do here would be
{code}
+ @Deprecated
public final static String ATTRIBUTE_SEPERATOR_CONF_KEY =
"attributes.seperator";
+ public final static String ATTRIBUTE_SEPERATOR_CONF_KEY =
"attributes.separator";
{code}
and replacing all uses of ATTRIBUTE_SEPERATOR_CONF_KEY with
ATTRIBUTE_SEPERATOR_CONF_KEY. Later in 2.0, the deprecated will be deleted.
2. Readability: there is no need for indentation here.
{code}
+ "The column names of the TSV data must be specified using the option:\n"
+
+ " -D" + COLUMNS_CONF_KEY + " option. This option takes the form
of " +
+ "comma-separated column names, where each column name is either"
+
{code}
Please align like this
{code}
+ "The column names of the TSV data must be specified using the option:\n"
+
+ " -D" + COLUMNS_CONF_KEY + " option. This option takes the form of " +
+ "comma-separated column names, where each column name is either" +
{code}
here and everywhere else.
> Fix ImportTsv spelling and usage issues
> ---------------------------------------
>
> Key: HBASE-13981
> URL: https://issues.apache.org/jira/browse/HBASE-13981
> Project: HBase
> Issue Type: Bug
> Components: mapreduce
> Affects Versions: 1.1.0.1
> Reporter: Lars George
> Assignee: Gabor Liptak
> Labels: beginner
> Fix For: 2.0.0, 1.3.0
>
> Attachments: HBASE-13981.1.patch, HBASE-13981.2.patch,
> HBASE-13981.3.patch
>
>
> The {{ImportTsv}} tool has various spelling and formatting issues. Fix those.
> In code:
> {noformat}
> public final static String ATTRIBUTE_SEPERATOR_CONF_KEY =
> "attributes.seperator";
> {noformat}
> It is "separator".
> In usage text:
> {noformat}
> "input data. Another special columnHBASE_TS_KEY designates that this column
> should be"
> {noformat}
> Space missing.
> {noformat}
> "Record with invalid timestamps (blank, non-numeric) will be treated as bad
> record."
> {noformat}
> "Records ... as bad records" - plural missing twice.
> {noformat}
> "HBASE_ATTRIBUTES_KEY can be used to specify Operation Attributes per record.
> Should be specified as key=>value where -1 is used
> as the seperator. Note that more than one OperationAttributes can be
> specified."
> {noformat}
> - Remove line wraps and indentation.
> - Fix "separator".
> - Fix wrong separator being output, it is not "-1" (wrong constant use in
> code)
> - General wording/style could be better (eg. last sentence now uses
> OperationAttributes without a space).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)