Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
905bce4a
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
905bce4a
编写于
5月 27, 2020
作者:
A
Alexander Tokmakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
f099ce19
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
30 addition
and
27 deletion
+30
-27
contrib/libuv-cmake/CMakeLists.txt
contrib/libuv-cmake/CMakeLists.txt
+5
-1
src/Dictionaries/CassandraBlockInputStream.cpp
src/Dictionaries/CassandraBlockInputStream.cpp
+11
-10
src/Dictionaries/CassandraDictionarySource.cpp
src/Dictionaries/CassandraDictionarySource.cpp
+10
-13
tests/integration/helpers/cluster.py
tests/integration/helpers/cluster.py
+3
-3
tests/integration/test_dictionaries_all_layouts_and_sources/external_sources.py
..._dictionaries_all_layouts_and_sources/external_sources.py
+1
-0
未找到文件。
contrib/libuv-cmake/CMakeLists.txt
浏览文件 @
905bce4a
...
...
@@ -227,7 +227,11 @@ set(uv_test_sources
# list(APPEND uv_test_libraries ws2_32)
# list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c)
#else()
list
(
APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE
)
if
(
CMAKE_SIZEOF_VOID_P EQUAL 4
)
list
(
APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE
)
endif
()
if
(
NOT CMAKE_SYSTEM_NAME STREQUAL
"Android"
)
# Android has pthread as part of its c library, not as a separate
# libpthread.so.
...
...
src/Dictionaries/CassandraBlockInputStream.cpp
浏览文件 @
905bce4a
# include <Common/config.h>
# include <Columns/ColumnNullable.h>
# include <Columns/ColumnString.h>
# include <Columns/ColumnsNumber.h>
# include <Core/ExternalResultDescription.h>
# include <Columns/ColumnString.h>
# include <IO/ReadHelpers.h>
#if !defined(ARCADIA_BUILD)
#include <Common/config.h>
#endif
#if USE_CASSANDRA
# include <utility>
# include "CassandraBlockInputStream.h"
# include "CassandraBlockInputStream.h"
#include <utility>
#include <Columns/ColumnNullable.h>
#include <Columns/ColumnString.h>
#include <Columns/ColumnsNumber.h>
#include <Core/ExternalResultDescription.h>
#include <Columns/ColumnString.h>
#include <IO/ReadHelpers.h>
#include "CassandraBlockInputStream.h"
namespace
DB
...
...
src/Dictionaries/CassandraDictionarySource.cpp
浏览文件 @
905bce4a
...
...
@@ -13,19 +13,16 @@ namespace DB
void
registerDictionarySourceCassandra
(
DictionarySourceFactory
&
factory
)
{
auto
create_table_source
=
[
=
](
const
DictionaryStructure
&
dict_struct
,
const
Poco
::
Util
::
AbstractConfiguration
&
config
,
const
std
::
string
&
config_prefix
,
Block
&
sample_block
,
auto
create_table_source
=
[
=
](
[[
maybe_unused
]]
const
DictionaryStructure
&
dict_struct
,
[[
maybe_unused
]]
const
Poco
::
Util
::
AbstractConfiguration
&
config
,
[[
maybe_unused
]]
const
std
::
string
&
config_prefix
,
[[
maybe_unused
]]
Block
&
sample_block
,
const
Context
&
/* context */
,
bool
/*check_config*/
)
->
DictionarySourcePtr
{
bool
/*check_config*/
)
->
DictionarySourcePtr
{
#if USE_CASSANDRA
return
std
::
make_unique
<
CassandraDictionarySource
>
(
dict_struct
,
config
,
config_prefix
+
".cassandra"
,
sample_block
);
#else
(
void
)
dict_struct
;
(
void
)
config
;
(
void
)
config_prefix
;
(
void
)
sample_block
;
throw
Exception
{
"Dictionary source of type `cassandra` is disabled because library was built without cassandra support."
,
ErrorCodes
::
SUPPORT_IS_DISABLED
};
#endif
...
...
@@ -37,9 +34,9 @@ namespace DB
#if USE_CASSANDRA
#
include <cassandra.h>
#
include <IO/WriteHelpers.h>
#
include "CassandraBlockInputStream.h"
#include <cassandra.h>
#include <IO/WriteHelpers.h>
#include "CassandraBlockInputStream.h"
namespace
DB
{
...
...
tests/integration/helpers/cluster.py
浏览文件 @
905bce4a
...
...
@@ -465,11 +465,11 @@ class ClickHouseCluster:
start
=
time
.
time
()
while
time
.
time
()
-
start
<
timeout
:
try
:
cass_client
.
connect
()
.
execute
(
"drop keyspace if exists test;"
)
logging
.
info
(
"Connected to Cassandra
%s
"
)
cass_client
.
connect
()
logging
.
info
(
"Connected to Cassandra"
)
return
except
Exception
as
ex
:
logging
.
warning
(
"Can't connect to
Minio
: %s"
,
str
(
ex
))
logging
.
warning
(
"Can't connect to
Cassandra
: %s"
,
str
(
ex
))
time
.
sleep
(
1
)
def
start
(
self
,
destroy_dirs
=
True
):
...
...
tests/integration/test_dictionaries_all_layouts_and_sources/external_sources.py
浏览文件 @
905bce4a
...
...
@@ -447,6 +447,7 @@ class SourceCassandra(ExternalSource):
self
.
client
=
cassandra
.
cluster
.
Cluster
([
self
.
internal_hostname
],
port
=
self
.
internal_port
)
self
.
session
=
self
.
client
.
connect
()
self
.
session
.
execute
(
"create keyspace if not exists test with replication = {'class': 'SimpleStrategy', 'replication_factor' : 1};"
)
self
.
session
.
execute
(
'drop table if exists test."{}"'
.
format
(
table_name
))
self
.
structure
[
table_name
]
=
structure
columns
=
[
'"'
+
col
.
name
+
'" '
+
self
.
TYPE_MAPPING
[
col
.
field_type
]
for
col
in
structure
.
get_all_fields
()]
keys
=
[
'"'
+
col
.
name
+
'"'
for
col
in
structure
.
keys
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录