cassandra-commits mailing list archives

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

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

Joseph Allemandou commented on CASSANDRA-10481:
-----------------------------------------------

We are writing to:

CREATE KEYSPACE "Test_Project" WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
'1'}  AND durable_writes = true;

CREATE TABLE "Test_Project".data (
    "_domain" text,
    project text,
    access text,
    agent text,
    granularity text,
    timestamp text,
    "_tid" timeuuid,
    views int,
    PRIMARY KEY (("_domain", project, access, agent, granularity), timestamp, "_tid")
) WITH CLUSTERING ORDER BY (timestamp ASC, "_tid" ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';


> 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
>             Fix For: 2.2.x
>
>
> 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