mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Merge branch 'master' into fastops
This commit is contained in:
commit
53fbb55813
@ -27,19 +27,20 @@ private:
|
||||
VectorType & vector;
|
||||
bool is_finished = false;
|
||||
|
||||
static constexpr size_t initial_size = 32;
|
||||
static constexpr size_t size_multiplier = 2;
|
||||
|
||||
void nextImpl() override
|
||||
{
|
||||
if (is_finished)
|
||||
throw Exception("WriteBufferFromVector is finished", ErrorCodes::CANNOT_WRITE_AFTER_END_OF_BUFFER);
|
||||
|
||||
size_t old_size = vector.size();
|
||||
vector.resize(old_size * 2);
|
||||
vector.resize(old_size * size_multiplier);
|
||||
internal_buffer = Buffer(reinterpret_cast<Position>(vector.data() + old_size), reinterpret_cast<Position>(vector.data() + vector.size()));
|
||||
working_buffer = internal_buffer;
|
||||
}
|
||||
|
||||
static constexpr size_t initial_size = 32;
|
||||
|
||||
public:
|
||||
WriteBufferFromVector(VectorType & vector_)
|
||||
: WriteBuffer(reinterpret_cast<Position>(vector_.data()), vector_.size()), vector(vector_)
|
||||
@ -57,8 +58,11 @@ public:
|
||||
: WriteBuffer(nullptr, 0), vector(vector_)
|
||||
{
|
||||
size_t old_size = vector.size();
|
||||
vector.resize(std::max(vector.size() + initial_size, vector.capacity()));
|
||||
set(reinterpret_cast<Position>(vector.data() + old_size), (vector.size() - old_size) * sizeof(typename VectorType::value_type));
|
||||
size_t size = (old_size < initial_size) ? initial_size
|
||||
: ((old_size < vector.capacity()) ? vector.capacity()
|
||||
: vector.capacity() * size_multiplier);
|
||||
vector.resize(size);
|
||||
set(reinterpret_cast<Position>(vector.data() + old_size), (size - old_size) * sizeof(typename VectorType::value_type));
|
||||
}
|
||||
|
||||
void finish()
|
||||
|
@ -236,6 +236,9 @@ void Compiler::compile(
|
||||
" -fuse-ld=" << compiler_executable_root << INTERNAL_LINKER_EXECUTABLE
|
||||
" -fdiagnostics-color=never"
|
||||
|
||||
/// Do not use libgcc and startup files. The library will work nevertheless and we avoid extra dependency.
|
||||
" -nodefaultlibs -nostartfiles"
|
||||
|
||||
#if INTERNAL_COMPILER_CUSTOM_ROOT
|
||||
/// To get correct order merge this results carefully:
|
||||
/// echo | clang -x c++ -E -Wp,-v -
|
||||
|
@ -26,7 +26,7 @@
|
||||
<values>
|
||||
<value>2</value>
|
||||
<value>500</value>
|
||||
<value>65535</value>
|
||||
<value>32768</value>
|
||||
</values>
|
||||
</substitution>
|
||||
</substitutions>
|
||||
|
@ -22,7 +22,7 @@ To install official packages add the Yandex repository in `/etc/apt/sources.list
|
||||
deb http://repo.yandex.ru/clickhouse/deb/stable/ main/
|
||||
```
|
||||
|
||||
If you want to use the most recent version, replace `stable` with `testing` (this is not recommended for production environments).
|
||||
If you want to use the most recent version, replace `stable` with `testing` (this is recommended for your testing environments).
|
||||
|
||||
Then run these commands to actually install packages:
|
||||
|
||||
@ -37,13 +37,25 @@ You can also download and install packages manually from here: <https://repo.yan
|
||||
|
||||
### From RPM Packages
|
||||
|
||||
Yandex does not run ClickHouse on `rpm` based Linux distributions and `rpm` packages are not as thoroughly tested. So use them at your own risk, but there are many other companies that do successfully run them in production without any major issues.
|
||||
Yandex ClickHouse team recommends using official pre-compiled `rpm` packages for CentOS, RedHat and all other rpm-based distributions.
|
||||
|
||||
For CentOS, RHEL or Fedora there are the following options:
|
||||
First you need to add our repository:
|
||||
|
||||
* Packages from <https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/> are generated from official `deb` packages by Yandex and have byte-identical binaries.
|
||||
* Packages from <https://github.com/Altinity/clickhouse-rpm-install> are built by independent company Altinity, but are used widely without any complaints.
|
||||
* Or you can use Docker (see below).
|
||||
```bash
|
||||
sudo yum install yum-utils
|
||||
sudo rpm --import https://repo.yandex.ru/clickhouse/CLICKHOUSE-KEY.GPG
|
||||
sudo yum-config-manager --add-repo https://repo.yandex.ru/clickhouse/rpm/stable/x86_64
|
||||
```
|
||||
|
||||
If you want to use the most recent version, replace `stable` with `testing` (this is recommended for your testing environments).
|
||||
|
||||
Then run these commands to actually install packages:
|
||||
|
||||
```bash
|
||||
sudo yum install clickhouse-server clickhouse-client
|
||||
```
|
||||
|
||||
You can also download and install packages manually from here: <https://repo.yandex.ru/clickhouse/rpm/stable/x86_64>.
|
||||
|
||||
### From Docker Image
|
||||
|
||||
@ -76,6 +88,13 @@ To start the server as a daemon, run:
|
||||
$ sudo service clickhouse-server start
|
||||
```
|
||||
|
||||
If you don't have `service` command, run as
|
||||
|
||||
``` bash
|
||||
$ sudo /etc/init.d/clickhouse-server start
|
||||
```
|
||||
|
||||
|
||||
See the logs in the `/var/log/clickhouse-server/` directory.
|
||||
|
||||
If the server doesn't start, check the configurations in the file `/etc/clickhouse-server/config.xml`.
|
||||
|
Loading…
Reference in New Issue
Block a user