cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Thompson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10481) Quoted capitalised keyspace doesn't work as output for Hadoop
Date Fri, 09 Oct 2015 17:30:05 GMT

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

Philip Thompson commented on CASSANDRA-10481:
---------------------------------------------

Which version of C* are you running?

> Quoted capitalised keyspace doesn't work as output for Hadoop
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-10481
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10481
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>         Environment: Linux
>            Reporter: Joseph Allemandou
>            Assignee: Philip Thompson
>
> When using CqlOutputFormat with a quoted keyspace containing capital letters, the initialisation
of the CqlRecordWriter fails.
> In the code,error is hapenning at metadata table creation in the core constructor:
> {code:title=CqlRecordWriter.java-main constructor|borderStyle=solid}
> CqlRecordWriter(Configuration conf) {
>          ...
>         try
>         {
>             String keyspace = ConfigHelper.getOutputKeyspace(conf);
>             try (Session client = CqlConfigHelper.getOutputCluster(ConfigHelper.getOutputInitialAddress(conf),
conf).connect(keyspace))
>             {
>                 ringCache = new NativeRingCache(conf);
>                 if (client != null)
>                 {
>                     TableMetadata tableMetadata = client.getCluster().getMetadata().getKeyspace(client.getLoggedKeyspace()).getTable(ConfigHelper.getOutputColumnFamily(conf));
>                 ...    
>     }
> {code}
> It seemed to be dues to the reused function Metadata.handleId(keyspace) that, applied
mulitple times, removes uoptes and finally lowercase the keyspace name.
> A valid solution (working for us at WMF) is to reuse the keyspace variable defined earlier
instead of using the client one.
> {code:title=CqlRecordWriter.java-main constructor|borderStyle=solid}
> CqlRecordWriter(Configuration conf) {
>          ...
>         try
>         {
>             String keyspace = ConfigHelper.getOutputKeyspace(conf);
>             try (Session client = CqlConfigHelper.getOutputCluster(ConfigHelper.getOutputInitialAddress(conf),
conf).connect(keyspace))
>             {
>                 ringCache = new NativeRingCache(conf);
>                 if (client != null)
>                 {
>                     TableMetadata tableMetadata = client.getCluster().getMetadata().getKeyspace(keyspace).getTable(ConfigHelper.getOutputColumnFamily(conf));
>                 ...    
>     }
> {code}



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

Mime
View raw message