You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Phil Miesle (Jira)" <ji...@apache.org> on 2020/10/09 16:33:00 UTC
[jira] [Updated] (CASSANDRA-16204) PicklingError: Can't pickle
: attribute lookup video_encoding
on cqlshlib.copyutil failed
[ https://issues.apache.org/jira/browse/CASSANDRA-16204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Miesle updated CASSANDRA-16204:
------------------------------------
Description:
This seems to be a different issue than Cassandra-14982 :
$ cqlsh --version
cqlsh 6.8.0
Following Datastax Academy course DS220, in the Denormalization exercise. I received
{code:java}
PicklingError: Can't pickle <class 'cqlshlib.copyutil.video_encoding'>: attribute lookup video_encoding on cqlshlib.copyutil failed{code}
on the COPY command into the following table:
{code:java}
CREATE TABLE videos_by_actor (
actor text,
added_date timestamp,
video_id timeuuid,
character_name text,
description text,
encoding frozen<video_encoding>,
tags set<text>,
title text,
user_id uuid,
PRIMARY KEY ( (actor), added_date, video_id )
) WITH CLUSTERING ORDER BY ( added_date desc, video_id asc);
COPY videos_by_actor(actor,added_date,video_id,character_name,description,encoding,tags,title,user_id) FROM 'videos_by_actor.csv' WITH HEADER = true{code}
Now, as it turns out my PRIMARY KEY was non-unique (noted when I failed to load as many records as were in the file), and when I changed to:
{code:java}
PRIMARY KEY ((actor), added_date, video_id, character_name){code}
the command worked. BUT the following options also worked (though they both dropped records):
{code:java}
WITH HEADER = true AND MINBATCHSIZE=1 AND MAXBATCHSIZE=1 AND PAGESIZE=10;{code}
and
{code:java}
WITH HEADER = true AND NUMPROCESSES=1;{code}
So this seems to be a problem of multi-threading and user-defined TYPEs?
I'll note that I'm running inside a WSL2 Docker Container based on ubuntu:bionic:
$ uname -a
Linux node-1 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
was:
This seems to be a different issue than Cassandra-14982 :
$ cqlsh --version
cqlsh 6.8.0
Following Datastax Academy course DS220, in the Denormalization exercise. I received
{code:java}
PicklingError: Can't pickle <class 'cqlshlib.copyutil.video_encoding'>: attribute lookup video_encoding on cqlshlib.copyutil failed{code}
on the COPY command into the following table:
{code:java}
CREATE TABLE videos_by_actor (
actor text,
added_date timestamp,
video_id timeuuid,
character_name text,
description text,
encoding frozen<video_encoding>,
tags set<text>,
title text,
user_id uuid,
PRIMARY KEY ( (actor), added_date, video_id )
) WITH CLUSTERING ORDER BY ( added_date desc, video_id asc);
COPY videos_by_actor(actor,added_date,video_id,character_name,description,encoding,tags,title,user_id) FROM 'videos_by_actor.csv' WITH HEADER = true{code}
Now, as it turns out my PRIMARY KEY was non-unique (noted when I failed to load as many records as were in the file), and when I changed to:
{code:java}
PRIMARY KEY ((actor), added_date, video_id, character_name){code}
the command worked. BUT the following options also worked (though they both dropped records):
{code:java}
WITH HEADER = true AND MINBATCHSIZE=1 AND MAXBATCHSIZE=1 AND PAGESIZE=10;{code}
and
{code:java}
WITH HEADER = true AND NUMPROCESSES=1;{code}
So this seems to be a problem of multi-threading and user-defined TYPEs?
> PicklingError: Can't pickle <class 'cqlshlib.copyutil.video_encoding'>: attribute lookup video_encoding on cqlshlib.copyutil failed
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-16204
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16204
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Interpreter
> Reporter: Phil Miesle
> Priority: Normal
> Attachments: videos_by_actor.csv.gz
>
>
> This seems to be a different issue than Cassandra-14982 :
> $ cqlsh --version
> cqlsh 6.8.0
> Following Datastax Academy course DS220, in the Denormalization exercise. I received
> {code:java}
> PicklingError: Can't pickle <class 'cqlshlib.copyutil.video_encoding'>: attribute lookup video_encoding on cqlshlib.copyutil failed{code}
> on the COPY command into the following table:
> {code:java}
> CREATE TABLE videos_by_actor (
> actor text,
> added_date timestamp,
> video_id timeuuid,
> character_name text,
> description text,
> encoding frozen<video_encoding>,
> tags set<text>,
> title text,
> user_id uuid,
> PRIMARY KEY ( (actor), added_date, video_id )
> ) WITH CLUSTERING ORDER BY ( added_date desc, video_id asc);
> COPY videos_by_actor(actor,added_date,video_id,character_name,description,encoding,tags,title,user_id) FROM 'videos_by_actor.csv' WITH HEADER = true{code}
> Now, as it turns out my PRIMARY KEY was non-unique (noted when I failed to load as many records as were in the file), and when I changed to:
> {code:java}
> PRIMARY KEY ((actor), added_date, video_id, character_name){code}
> the command worked. BUT the following options also worked (though they both dropped records):
> {code:java}
> WITH HEADER = true AND MINBATCHSIZE=1 AND MAXBATCHSIZE=1 AND PAGESIZE=10;{code}
> and
> {code:java}
> WITH HEADER = true AND NUMPROCESSES=1;{code}
> So this seems to be a problem of multi-threading and user-defined TYPEs?
> I'll note that I'm running inside a WSL2 Docker Container based on ubuntu:bionic:
> $ uname -a
> Linux node-1 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org