-
Notifications
You must be signed in to change notification settings - Fork 349
How to deploy QSRV to administrate QVS resource files
QVS SRV is simply called QSRV, which operates as an independent WebServer process. It can be deployed independently to manage resource files on QVS, such as reading, uploading and downloading data files stored on the remote server.
To deploy QSRV, first you need to install esProc Enterprise Edition, which includes the complete QVS project. Then deploy QSRV based on QVS according to the following directions. Download esProc Enterprise Edition: https://www.esproc.com/download-esproc/ The application is located in [installation directory]\esProc\q-server\qvs. The jars QSRV server needs are located in [installation directory]\esProc\lib and [installation directory]\esProc\q-server\webapps\qvs\WEB-INF\lib. According to the cloud storage service QSRV will access, copy the corresponding third-party jars from [installation directory]\esProc\q-extlib to [installation directory]\esProc\q-server\webapps\qvs\WEB-INF\lib.
Now we’ll walk you through QSRV deployment using the example of deploying it on server 192.168.1.6 to manage resource files stored on cloud storage service S3.
esProc Enterprise Edition offers the built-in Tomcat server. Deploy the IP and port number in file【esProc installation directory】\esProc\q-server\conf\server.xml.
<?xml version="1.0" encoding="UTF-8"?>
<Server port="8041" shutdown="SHUTDOWN">
…
<Service name="Catalina">
<Connector port`="8090" protocol="HTTP/1.1"
connectionTimeout="0"
/>
<Engine name="Catalina" defaultHost="localhost">
…
<Host name="192.168.1.6" appBase="webapps"
unpackWARs="true" autoDeploy="false"
deployXML ="false" deployOnStartup ="false" >
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<Context path="/qvs" docBase="qvs" reloadable="true" privileged="true"> </Context>
</Host>
</Engine>
</Service>
</Server>
Set the running mode of independently deployed QSRV as 0 (in service) and specify the remote storage address for the user to manage data files on the remote storage. Configuration file:【esProc installation directory】/esProc/q-server/webapps/qvs/WEB-INF/home/qvsConfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<qvs>
<runMode>0</runMode>
<locale language="en" country=""/>
<cacheSystem cachePath="cache" blockSize="1024" minFreeSpace="2" />
<verifies>
<verify code="demoqvs">
<store type="S3">
{"region":"us-east-2","accessKey":"AKLAVSPDUYZ7O7WTX3C2","secretKey":"6/5xYPO7a+9Po+IE1ySbmu9UB2hWIkWek1Sqn6E4","endPoint":"https://s3.us-east-2.amazonaws.com"}
</store>
</verify>
</verifies>
</qvs>
<store/>
The storage service providers esProc supports are S3, GCS, NFS, Azure, HDFS and Mount. The contents under tags are RSRV’s remote storage connection information. In the above example, they are S3 user information form. The contents need to be configured as the user’s own remote storage address.
Execute StartQVS.bat (StartQVS.sh under Linux) located in [installation directory]\esProc\bin to start the QSRV server, whose interface is as follows after it is successfully started:
Execute esproc.exe/startup.bat (startup.sh under Linux) located in [installation directory]\esProc\bin to start esProc designer, execute script, and upload/download resource files to/from QVS server on the cloud storage or perform other operations.
A | |
---|---|
1 | =Qconnect("http://192.168.1.6:8090/qvs":"demoqvs",30,300) |
2 | =Qdirectory("sln") |
3 | =Qfile("sln/Employee.ctx") |
4 | =A3.open().import@t() |
5 | =Qload("sln/emp.ctx":[1,2,3]) |
6 | =Qload(,"sln/emp.ctx":[1,2,3]) |
A1: Execute Qconnect(url:v, wt, it) to connect to the QSRV server according to the specified url. The verification string is by default demoqvs, the longest wait time is 30 seconds, and the longest idle time is 300 seconds. Once the server is connected, we can execute various remote operations.
A2: Qdirectory(path) function gets a list of names of all files in the specified path.
A3: Qfile(fn) function reads the specified file and returns a file object, on which more operations can be executed. A4, for example, imports data from the file as a table sequence.
A5: Qload() function uploads file group/composite table file emp.ctx.
A6: Qload() function downloads file group/composite table file emp.ctx.
The Qconnect(), Qdirectory(), Qfile() and Qload() functions used in the above example are intended for use in cloud storage access. They are Q functions. The Q functions QSRV supports also include Qmove(), Qenv() and Qlock(). Find more details in Function Reference.
1. Server type: GCE; Address format: {"credentials":"scudata-891de5fb1bc3.json","project":"scudata","zone":"us-west2-a"}
2. SSP: GCS; Address format: {"credentials":" scudata-891de5fb1bc3.json"}
Note: The JSON file is generated when the user creates their Google account. Its contents are information of connection to the Google Cloud Storage. If GCS remote storage service needs to be used, deploy the JSON file in the cloud service, during which both absolute path and relative path are supported. When QVS uses the remote storage, the relative path configured in credentials is relative to qvs\WEB-INF\home; when QVA uses the remote storage, the relative path configured in credentials is relative to qva\WEB-INF\home.
- SSP: NFS; Address format: {“hostName”:“192.168.1.3”,“rootPath”:“/mnt/share” ,bCacheEnable:true } bCacheEnable: Enable cache functionality; default value is false, which means no caching. The property only supports proprietary mode.
- SSP: Azure; Address format: {"accountName":"test1","accountKey":"MSU9nLvFd+uasww8EtB45GzJ8eeg2FzFXhBb6lfaJ8l5kk0PVsgrc1KUyQN+tj3JyazSkutHuxKL+AStMuU3UA==","endPoint":"core.windows.net","protocol":"https"}
- SSP: HDFS; Address format: {"urlName":"hdfs://192.168.1.23:9000/","userName":"root", rootPath:"/hdfs",bCacheEnable:true} urlName/username: HDFS URL/username. rootPath: Set the root directory, which makes it convenient to use a relative path when reading remote storage files. bCacheEnable: Enable cache functionality; default value is false, which means no caching. The property only supports proprietary mode.
- SSP: OSS; Address format: {“accessKey”:“LTII5tRgzS8Ns2arNpjU73Wt”,“secretKey”:“4dSAtbejF6arKpfJjUAxhO26JGaytM”,“endPoint”:“http://oss-cn-beijing.aliyuncs.com”}
- SSP: Mount; Address format: {"rootPath":"/mnt"} rootPath: Set the root directory, which makes it convenient to use a relative path when reading remote storage files.
SPL Resource: SPL Official Website | SPL Blog | Download esProc SPL | SPL Source Code