当我尝试使用以下命令将表复制到cassandra时:
copy images from 'images.csv'
Run Code Online (Sandbox Code Playgroud)
我收到错误:
'PicklingError: Can't pickle <class 'cqlshlib.copyutil.ImmutableDict'>: attribute lookup cqlshlib.copyutil.ImmutableDict failed'
Run Code Online (Sandbox Code Playgroud)
我已经成功导入了所有其他表,但是这个表不起作用.与此相关的唯一区别是它包含用于图像的大型二进制blob.
以下是csv文件中的示例行:
b267ba01-5420-4be5-b962-7e563dc245b0,,0x89504e...[large binary blob]...426082,0,7e700538-cce3-495f-bfd2-6a4fa968bdf6,pentium_e6600,01fa819e-3425-47ca-82aa-a3eec319a998,0,7e700538-cce3-495f-bfd2-6a4fa968bdf6,,,png,0
Run Code Online (Sandbox Code Playgroud)
以下是导致错误的文件:https: //www.dropbox.com/s/5mrl6nuwelpf3lz/images.csv?dl = 0
这是我的架构:
CREATE TABLE dealtech.images (
id uuid PRIMARY KEY,
attributes map<text, text>,
data blob,
height int,
item_id uuid,
name text,
product_id uuid,
scale double,
seller_id uuid,
text_bottom int,
text_top int,
type text,
width int
)
Run Code Online (Sandbox Code Playgroud)
这些表是使用导出的cassandra 2.x,我目前正在使用cassandra 3.0.9它们导入它们.
我可以登录并访问管理器页面,但是当我尝试上传 war 文件时,它失败并显示 403 错误。我已经在 tomcat-users.xml 中添加了权限这里是相关的行:
<user username="admin" password="password123" roles="admin,manager-gui,admin-gui"/>
Run Code Online (Sandbox Code Playgroud)
/usr/share/tomcat8-admin/manager/META-INF/context.xml 中的 Valve 类已经被注释掉了。
<Context antiResourceLocking="false" privileged="true" >
<!--
Remove the comment markers from around the Valve below to limit access to
the host-manager application to clients connecting from localhost
-->
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
</Context>
Run Code Online (Sandbox Code Playgroud)
当我尝试上传战争文件时,我仍然收到消息:
403 Access Denied
You are not authorized to view this page.
If you have already configured the Manager application to allow access and you have used your browsers back button, …Run Code Online (Sandbox Code Playgroud)