Support
Quality
Security
License
Reuse
kandi has reviewed kylin and discovered the below as its top functions. This is intended to give you an instant insight into kylin implemented functionality, and help decide if they suit your requirements.
pull docker image
start the container
default
docker pull apachekylin/apache-kylin-standalone:4.0.0
Could not load database driver: KylinEngineSpec
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
helm upgrade --install --values my-values.yaml <release-name> superset/superset
helm upgrade --values my-values.yaml <release-name> superset/superset
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
-----------------------
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
helm upgrade --install --values my-values.yaml <release-name> superset/superset
helm upgrade --values my-values.yaml <release-name> superset/superset
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
-----------------------
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
helm upgrade --install --values my-values.yaml <release-name> superset/superset
helm upgrade --values my-values.yaml <release-name> superset/superset
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
-----------------------
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
helm upgrade --install --values my-values.yaml <release-name> superset/superset
helm upgrade --values my-values.yaml <release-name> superset/superset
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
-----------------------
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
helm upgrade --install --values my-values.yaml <release-name> superset/superset
helm upgrade --values my-values.yaml <release-name> superset/superset
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
-----------------------
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
helm upgrade --install --values my-values.yaml <release-name> superset/superset
helm upgrade --values my-values.yaml <release-name> superset/superset
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
-----------------------
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
helm upgrade --install --values my-values.yaml <release-name> superset/superset
helm upgrade --values my-values.yaml <release-name> superset/superset
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
Update to mapred-default.xml not visible in web UI configuration
<property>
<name>mapreduce.map.memory.mb</name>
<value>1024</value>
</property>
Copy particular XML document element to Another XML document using shell commands
xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']" input.xml
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
sudo apt-get -y install xmlstarlet
xmlstarlet ed -a "/configuration/property[last()]" -t elem -n property \
-v "$(xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']/*" input.xml)" \
target.xml | xmlstarlet unesc | xmlstarlet fo > new_target.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>mapreduce.job.split.metainfo.maxsize</name>
<value>-1</value>
<description>The maximum permissible size of the split metainfo file.
The JobTracker won't attempt to read split metainfo files bigger than
the configured value. No limits if set to -1.
</description>
</property>
<property>
<name>mapreduce.map.output.compress</name>
<value>true</value>
<description>Compress map outputs</description>
</property>
...
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
</configuration>
-----------------------
xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']" input.xml
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
sudo apt-get -y install xmlstarlet
xmlstarlet ed -a "/configuration/property[last()]" -t elem -n property \
-v "$(xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']/*" input.xml)" \
target.xml | xmlstarlet unesc | xmlstarlet fo > new_target.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>mapreduce.job.split.metainfo.maxsize</name>
<value>-1</value>
<description>The maximum permissible size of the split metainfo file.
The JobTracker won't attempt to read split metainfo files bigger than
the configured value. No limits if set to -1.
</description>
</property>
<property>
<name>mapreduce.map.output.compress</name>
<value>true</value>
<description>Compress map outputs</description>
</property>
...
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
</configuration>
-----------------------
xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']" input.xml
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
sudo apt-get -y install xmlstarlet
xmlstarlet ed -a "/configuration/property[last()]" -t elem -n property \
-v "$(xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']/*" input.xml)" \
target.xml | xmlstarlet unesc | xmlstarlet fo > new_target.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>mapreduce.job.split.metainfo.maxsize</name>
<value>-1</value>
<description>The maximum permissible size of the split metainfo file.
The JobTracker won't attempt to read split metainfo files bigger than
the configured value. No limits if set to -1.
</description>
</property>
<property>
<name>mapreduce.map.output.compress</name>
<value>true</value>
<description>Compress map outputs</description>
</property>
...
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
</configuration>
-----------------------
xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']" input.xml
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
sudo apt-get -y install xmlstarlet
xmlstarlet ed -a "/configuration/property[last()]" -t elem -n property \
-v "$(xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']/*" input.xml)" \
target.xml | xmlstarlet unesc | xmlstarlet fo > new_target.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>mapreduce.job.split.metainfo.maxsize</name>
<value>-1</value>
<description>The maximum permissible size of the split metainfo file.
The JobTracker won't attempt to read split metainfo files bigger than
the configured value. No limits if set to -1.
</description>
</property>
<property>
<name>mapreduce.map.output.compress</name>
<value>true</value>
<description>Compress map outputs</description>
</property>
...
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
</configuration>
-----------------------
xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']" input.xml
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
sudo apt-get -y install xmlstarlet
xmlstarlet ed -a "/configuration/property[last()]" -t elem -n property \
-v "$(xmlstarlet sel -t -c "/configuration/property[name='hbase.zookeeper.quorum']/*" input.xml)" \
target.xml | xmlstarlet unesc | xmlstarlet fo > new_target.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>mapreduce.job.split.metainfo.maxsize</name>
<value>-1</value>
<description>The maximum permissible size of the split metainfo file.
The JobTracker won't attempt to read split metainfo files bigger than
the configured value. No limits if set to -1.
</description>
</property>
<property>
<name>mapreduce.map.output.compress</name>
<value>true</value>
<description>Compress map outputs</description>
</property>
...
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-nn-nn-nn-nn.ec2.internal</value>
</property>
</configuration>
sed command to find and replace string with special characters to a string in command line
sed -i "s#root.*dfs.*'#hadoop#g; s#localhost#ip-00-00-00-000.ec2.internal#g" /usr/local/kylin/kylin.properties
kylin.source.hive.beeline-params=-n hadoop -u jdbc:hive2://ip-00-00-00-000.ec2.internal:xxxx
sed -i "0,/root.*dfs/{s#root.*dfs.*'#hadoop#g; s#localhost#ip-00-00-00-000.ec2.internal#g}" /usr/local/kylin/kylin.properties
-----------------------
sed -i "s#root.*dfs.*'#hadoop#g; s#localhost#ip-00-00-00-000.ec2.internal#g" /usr/local/kylin/kylin.properties
kylin.source.hive.beeline-params=-n hadoop -u jdbc:hive2://ip-00-00-00-000.ec2.internal:xxxx
sed -i "0,/root.*dfs/{s#root.*dfs.*'#hadoop#g; s#localhost#ip-00-00-00-000.ec2.internal#g}" /usr/local/kylin/kylin.properties
-----------------------
sed -i "s#root.*dfs.*'#hadoop#g; s#localhost#ip-00-00-00-000.ec2.internal#g" /usr/local/kylin/kylin.properties
kylin.source.hive.beeline-params=-n hadoop -u jdbc:hive2://ip-00-00-00-000.ec2.internal:xxxx
sed -i "0,/root.*dfs/{s#root.*dfs.*'#hadoop#g; s#localhost#ip-00-00-00-000.ec2.internal#g}" /usr/local/kylin/kylin.properties
-----------------------
$ cat tst.awk
BEGIN {
map["root --hiveconf hive.security.authorization.sqlstd.confwhitelist.append='mapreduce.job.*|dfs.*'"] = "hadoop"
map["localhost"] = "ip-00-00-00-000.ec2.internal"
}
{
for (str in map) {
if ( s = index($0,str) ) {
$0 = substr($0,1,s-1) map[str] substr($0,s+length(str))
}
}
print
}
$ awk -f tst.awk file
kylin.source.hive.beeline-params=-n hadoop -u jdbc:hive2://ip-00-00-00-000.ec2.internal:xxxx
QUESTION
Could not load database driver: KylinEngineSpec
Asked 2021-Oct-29 at 21:21Just install Apache Superset within Kubernetes. Already have a working Apache Kylin Cluster in the same Kubernetes Cluster. While trying to connect Kylin within Superset i get the following error message:
ERROR: Could not load database driver: KylinEngineSpec
Superset is installed using this repo:
helm repo add superset https://apache.github.io/superset
The connection string which is used:
kylin://<username>:<password>@<hostname>:<port>/<project name>
Any ideas?
ANSWER
Answered 2021-Aug-20 at 10:36By default superset comes with no KylinEngineSpec
driver installed. You need to provide it as an additional requirement at install.
Recommended driver for Apache Kylin is kylinpy
[reference].
The documentation is a bit misleading. Specifying additional packages in additionalRequiremets
does not properly install them. Instead you have to add those to bootstrapScript
.
Create a file with overrides (in my case it will be my-values.yaml
),
add below to this file
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
kylinpy \
psycopg2==2.8.5 \
redis==3.2.1 && \
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
Rembember, this will override bootstrapScript
not add to it
Then, to install superset with new values
helm upgrade --install --values my-values.yaml <release-name> superset/superset
Replace <release-name>
witho your desired name
or upgrade, if you already have superset installed
helm upgrade --values my-values.yaml <release-name> superset/superset
Again replace <release-name>
with your release name
Then, after execing into a pod, you can see kylinpy
was installed
root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
kylinpy 2.8.4
To install it specify additionalRequirements
with --set
flag [reference]
helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
replace <release-name>
with your desired name
If you already have superset installed, you can perform an upgrade:
helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
Again, replace <release-name>
with your release name
Use helm get values
to see whether that new setting took effect. You should see something like
USER-SUPPLIED VALUES:
additionalRequirements:
- kylinpy
I strongly recommend going through official docs about running superset in Kubernetes. There are a lot more settings to change other than database drivers.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Save this library and start creating your kit
Save this library and start creating your kit