Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
51bd7775
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,发现更多精彩内容 >>
提交
51bd7775
编写于
4月 14, 2012
作者:
A
Alexey Milovidov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Using LZ4 by default [#CONV-4594].
上级
65b1caa9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
dbms/include/DB/IO/CompressedWriteBuffer.h
dbms/include/DB/IO/CompressedWriteBuffer.h
+1
-1
dbms/include/DB/Storages/StorageLog.h
dbms/include/DB/Storages/StorageLog.h
+1
-1
utils/compressor/main.cpp
utils/compressor/main.cpp
+5
-5
未找到文件。
dbms/include/DB/IO/CompressedWriteBuffer.h
浏览文件 @
51bd7775
...
@@ -94,7 +94,7 @@ private:
...
@@ -94,7 +94,7 @@ private:
public:
public:
CompressedWriteBuffer
(
CompressedWriteBuffer
(
WriteBuffer
&
out_
,
WriteBuffer
&
out_
,
CompressionMethod
::
Enum
method_
=
CompressionMethod
::
QuickLZ
,
CompressionMethod
::
Enum
method_
=
CompressionMethod
::
LZ4
,
size_t
buf_size
=
DBMS_DEFAULT_BUFFER_SIZE
)
size_t
buf_size
=
DBMS_DEFAULT_BUFFER_SIZE
)
:
BufferWithOwnMemory
<
WriteBuffer
>
(
buf_size
),
out
(
out_
),
method
(
method_
),
qlz_state
(
new
qlz_state_compress
)
{}
:
BufferWithOwnMemory
<
WriteBuffer
>
(
buf_size
),
out
(
out_
),
method
(
method_
),
qlz_state
(
new
qlz_state_compress
)
{}
...
...
dbms/include/DB/Storages/StorageLog.h
浏览文件 @
51bd7775
...
@@ -75,7 +75,7 @@ private:
...
@@ -75,7 +75,7 @@ private:
{
{
Stream
(
const
std
::
string
&
data_path
,
const
std
::
string
&
marks_path
)
:
Stream
(
const
std
::
string
&
data_path
,
const
std
::
string
&
marks_path
)
:
plain
(
data_path
,
DBMS_DEFAULT_BUFFER_SIZE
,
O_APPEND
|
O_CREAT
|
O_WRONLY
),
plain
(
data_path
,
DBMS_DEFAULT_BUFFER_SIZE
,
O_APPEND
|
O_CREAT
|
O_WRONLY
),
compressed
(
plain
,
CompressionMethod
::
LZ4
),
compressed
(
plain
),
marks
(
marks_path
,
DBMS_DEFAULT_BUFFER_SIZE
,
O_APPEND
|
O_CREAT
|
O_WRONLY
)
{}
marks
(
marks_path
,
DBMS_DEFAULT_BUFFER_SIZE
,
O_APPEND
|
O_CREAT
|
O_WRONLY
)
{}
WriteBufferFromFile
plain
;
WriteBufferFromFile
plain
;
...
...
utils/compressor/main.cpp
浏览文件 @
51bd7775
...
@@ -14,21 +14,21 @@ int main(int argc, char ** argv)
...
@@ -14,21 +14,21 @@ int main(int argc, char ** argv)
try
try
{
{
bool
decompress
=
false
;
bool
decompress
=
false
;
bool
use_
lz4
=
false
;
bool
use_
qlz
=
false
;
if
(
argc
==
2
)
if
(
argc
==
2
)
{
{
decompress
=
0
==
strcmp
(
argv
[
1
],
"-d"
);
decompress
=
0
==
strcmp
(
argv
[
1
],
"-d"
);
use_
lz4
=
0
==
strcmp
(
argv
[
1
],
"--lz4
"
);
use_
qlz
=
0
==
strcmp
(
argv
[
1
],
"--qlz
"
);
}
}
if
(
argc
>
2
||
(
argc
==
2
&&
!
decompress
&&
!
use_
lz4
))
if
(
argc
>
2
||
(
argc
==
2
&&
!
decompress
&&
!
use_
qlz
))
{
{
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" [-d|--
lz4
] < in > out"
<<
std
::
endl
;
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" [-d|--
qlz
] < in > out"
<<
std
::
endl
;
return
1
;
return
1
;
}
}
DB
::
CompressionMethod
::
Enum
method
=
use_
lz4
?
DB
::
CompressionMethod
::
LZ4
:
DB
::
CompressionMethod
::
QuickLZ
;
DB
::
CompressionMethod
::
Enum
method
=
use_
qlz
?
DB
::
CompressionMethod
::
QuickLZ
:
DB
::
CompressionMethod
::
LZ4
;
Poco
::
SharedPtr
<
DB
::
ReadBuffer
>
rb
=
new
DB
::
ReadBufferFromFileDescriptor
(
STDIN_FILENO
);
Poco
::
SharedPtr
<
DB
::
ReadBuffer
>
rb
=
new
DB
::
ReadBufferFromFileDescriptor
(
STDIN_FILENO
);
Poco
::
SharedPtr
<
DB
::
WriteBuffer
>
wb
=
new
DB
::
WriteBufferFromFileDescriptor
(
STDOUT_FILENO
);
Poco
::
SharedPtr
<
DB
::
WriteBuffer
>
wb
=
new
DB
::
WriteBufferFromFileDescriptor
(
STDOUT_FILENO
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录