How to make clickhouse take new users.xml file? - clickhouse

Do I have to restart clickhouse to make it read any update to users.xml?
Is there a way to juse "reload" clickhouse?

These files are reloaded in runtime, no need to restart the server.
As you can notice config folder has several files, like
config-preprocessed.xml
config.xml
users-preprocessed.xml
users.xml
.*-preprocessed.xml are for parsed config so you will see when it is loaded and parsed.

I wouldn't recommend to modify files '/etc/clickhouse-server/config.xml' or 'etc/clickhouse-server/user.xml' because it will be rewritten after upgrading ClickHouse and you will lose custom settings.
The subfolder '/etc/clickhouse-server/config.d/' and '/etc/clickhouse-server/users.d/' serve to store overrides for 'config.xml' and 'user.xml' relatively.
Example overrides for 'config.xml':
config.d/config.xml
<?xml version="1.0"?>
<yandex>
<listen_host replace="replace">::</listen_host>
<dictionaries_config replace="replace">dictionaries/*.xml</dictionaries_config>
<openSSL>
<client>
<verificationMode replace="replace">none</verificationMode>
</client>
</openSSL>
</yandex>
config.d/cluster.xml
<?xml version="1.0"?>
<yandex>
<remote_servers>
<your_cluster>
<!-- topology definition -->
</your_cluster>
</remote_servers>
<zookeeper>
<!-- .. -->
</zookeeper>
</yandex>
config.d/kafka.xml
<?xml version="1.0"?>
<yandex>
<!-- The default configuration for Kafka Engine Table (https://clickhouse.yandex/docs/en/operations/table_engines/kafka/#configuration). -->
<kafka>
<bootstrap_servers>11.22.33.44:6667,11.22.33.55:6667,11.22.33.66:6667</bootstrap_servers>
<auto_offset_reset>latest</auto_offset_reset>
</kafka>
<!-- The Topics configurations. -->
<kafka_topic_name>
<group_id>clickhouse-group_id</group_id>
</kafka_topic_name>
</yandex>
Example overrides for 'users.xml':
users.d/user.xml
<?xml version="1.0"?>
<yandex>
<users>
<default>
<password replace="replace">hello_clickhouse</password>
</default>
<readonly>
<password replace="replace">hello</password>
</readonly>
</users>
</yandex>
Another example of config overrides.
See for details ClickHouse Configuration files.

Related

Configure EhCache 3 to Auto Create Needed Caches With Default Template

I want EhCache to create caches using the default template. Here's my ehcache.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<config
xmlns:jsr107='http://www.ehcache.org/v3/jsr107'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.ehcache.org/v3'
xsi:schemaLocation="
http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.0.xsd
http://www.ehcache.org/v3/jsr107 http://www.ehcache.org/schema/ehcache-107-ext-3.0.xsd">
<service>
<jsr107:defaults default-template="default" jsr-107-compliant-atomics="true">
</jsr107:defaults>
</service>
<cache-template name="default">
<expiry>
<ttl unit="seconds">5</ttl>
</expiry>
<heap>100</heap>
</cache-template>
<!-- <cache alias="test" uses-template="default" />--> <!-- I want to omit this. -->
</config>
Here's my application.yml file:
spring:
cache:
jcache:
config: classpath:ehcache.xml
I don't want to have to update ehcache.xml every time I add need new cache name. How do I configure EhCache with Spring Boot to use my default Template?
If I don't specify the cache name configuration, I get this error:
java.lang.IllegalArgumentException: Cannot find cache named 'test' for CacheResultOperation
I believe you are missing this configuration:
properties.put("hibernate.javax.cache.missing_cache_strategy", "create-warn"); //Use create if you don't want to see a warning

Why is my Magento2 di.xml not having any effect?

I've overridden \Magento\Checkout\Block\Cart\Item\Renderer and when I add this to the end of config in /app/etc/di.xml the override works.
<preference for="Magento\Checkout\Block\Cart\Item\Renderer" type="Tls\Module\Block\Cart\Item\Renderer" />
However, when I try to use /app/code/Tls/Module/etc/di.xml there is no effect. This is the contents of my di.xml (though I've tried many things)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<preference for="Magento\Checkout\Block\Cart\Item\Renderer" type="Tls\Module\Block\Cart\Item\Renderer" />
</config>
Magento 2.2.4

Joomla Install/Uninstall SQL FIles Location in a Package

I am building a Joomla package with a component, multiple modules and a plugin.
My question is, where should I place the install.sql and uninstall.sql files, relative to the package root? Right now they are at root/com_mypackage/administrator/sql/install.mysql.utf8.sql and they are defined in the component's manifest as:
<install><!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
However, this doesn't seem right to me. Should I include administrator before the path in the <file> tag?
Of course, the component itself will be packed in its own .zip, to be included in the Package's XML install file.
No there is no need to this tag in administrator tag. you missing some in manifest.xml
for fully doc try:-
http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_an_install-uninstall-update_script_file
http://docs.joomla.org/Components:xml_installfile
on my end manifest.xml (my .sql in admin/install/install.mysql.utf8):-
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5" method="upgrade">
<name>Social</name>
<license>Open Source License, GPL v2 based</license>
<author>me</author>
<authorEmail>developers#me.com</authorEmail>
<authorUrl>http://www.me.com</authorUrl>
<creationDate>2012-01-01</creationDate>
<copyright>2013, me</copyright>
<version>1.1</version>
<description></description>
<!-- Installation -->
<install>
<sql>
<file driver="mysql" charset="utf8">install/install.mysql.utf8.sql</file>
</sql>
</install>
<installfile>install/install.php</installfile>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">install/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<uninstallfile>install/uninstall.php</uninstallfile>
and rest of

jRebel not work with Message resource bundle

I am using jRebel version 5.0.0 in my Spring project. Everything works well, any changes in Java, JSP or JS files was affected immediately. But when I modify some message keys in MessageResource.properties file, it does not reload the new modification. All of my resource bundle files are in same directory: myproject\src\main\webapp\WEB-INF**;
and in target folder (built files) **myproject\target\myproject\WEB-INF.
I do not use external jRebel config file, but jRebel plugin for Eclipse, so I found the auto-generated jRebel config file in myproject\target\myproject\WEB-INF\classes\jrebel.xml.
Here is its content:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
<classpath>
<dir name="D:/workspace/.projects/myproject/target/myproject/WEB-INF/classes">
</dir>
</classpath>
<web>
<link target="/">
<dir name="D:/workspace/.projects/myproject/src/main/webapp">
</dir>
</link>
</web>
</application>
Could you please help me this issue? Thank you so much.

Glassfish directory mappings: resources are cached by glassfish

I use the external resources mapping by glassfish for storing user uploaded images (sun-web.xml):
<property name="downloadroot" value="from=/downloaded dir=c:\glassfishv3\downloads"/>
I store uploaded images to this directory. The first download is ok, the image is shown at the address server:8080/downloaded/image_13.png. But when the users uploads another file and replaces the image (it is really replaced in file system) the GF doesn't show new image, but the old one. Event restart and osgi-cache/generated clean doesn't help! That's very misleading and hope anyone could help me with this issue..
Ok, the issue was in JRebel! I spent the whole day, and finally found the issue! So, if anyone meets with it, the reciept to fix is to include the gf virtual path to rebel.xml like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<application>
<classpath>
<dir name="${myproject.root}\target\classes" />
</classpath>
<web>
<link target="">
<dir name="${myproject.root}\src\main\webapp" />
</link>
<link target="">
<dir name="C:\glassfish3.1" />
</link>
</web>
</application>

Resources