Cisco ParStream Manual, Release 6.0
[Pages:420]Cisco ParStream
Cisco ParStream Manual
? 2018 Cisco and/or its affiliates.
Document Information:
Title:
Cisco ParStream Manual
Version:
6.0.1
Date Published:
Date Printed: November 12, 2018
? 2018 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Table of Contents
Cisco ParStream Manual
i
Table of Contents
iii
1 Preface
1
1.1 About Cisco ParStream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Document Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.5 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.6 Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.7 Command Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.8 Administrator/User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Installation
4
2.1 Installation Overview and Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Supported Platforms and Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Third Party Package Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.5 Configuring Linux OS for Cisco ParStream . . . . . . . . . . . . . . . . . . . . . . . . 8
2.6 Installing Cisco ParStream Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.7 PAM Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.8 Cisco ParStream Installation Directory Tree . . . . . . . . . . . . . . . . . . . . . . . 12
2.9 Administrative User 'parstream' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.10 Systemd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3 Getting Started Tutorial
15
3.1 Cisco ParStream Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Database Data Storage Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 Additional Packages Required to Run the Tutorial . . . . . . . . . . . . . . . . . . . . 15
3.4 General Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5 Create a Minimal Cluster Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.6 Provide a Table Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.7 Start the Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Page iii
3.8 View Processes and Open Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.9 Using Interactive SQL Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.10 Connect and View Cluster Information . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.11 Defining a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.12 Start the Importer to Load Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.13 Run Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.14 Stop the Cisco ParStream Server and the Cisco ParStream Importer . . . . . . . . . 24 3.15 Cleanup the Cluster and Restore the Tutorial Environment . . . . . . . . . . . . . . . 25
4 Important Constraints Using Cisco ParStream
26
4.1 Important General Constraints with Data Types . . . . . . . . . . . . . . . . . . . . . 26
4.2 Important General Constraints with SQL Commands . . . . . . . . . . . . . . . . . . 26
4.3 Important General Constraints when Importing Data . . . . . . . . . . . . . . . . . . 27
5 Database Design
28
5.1 Data Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2 Schema/Metadata Versioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.3 Bitmap Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6 Clustering and Distribution
39
6.1 High Availability and Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2 Running Cisco Parstream with Multiple Server Nodes . . . . . . . . . . . . . . . . . . 39
6.3 Partition Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7 Dynamic Columns
60
7.1 Motivation for Dynamic Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.2 Using Dynamic Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
8 Database Configuration
72
8.1 Conf Directories and INI Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.2 Internationalization (I18N) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
9 Server Administration
75
9.1 Starting the Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
9.2 User Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
9.3 DBMS Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
9.4 Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Page iv
9.5 Monitoring, Logging, and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10 Importing Data
87
10.1 Overview of Data Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
10.2 General Import Characteristics and Settings . . . . . . . . . . . . . . . . . . . . . . . 88
10.3 General Format of CSV Import Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
10.4 CSV File Format of Specific Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.5 Using the CSV Importer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
10.6 ETL Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
10.7 Import Data with INSERT INTO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
11 Deleting Data
108
11.1 Delete Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
12 Client Applications and Tools
109
12.1 Database Clients pnc and netcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
12.2 PSQL client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
13 Options Reference
115
13.1 Commandline Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
13.2 Global Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
13.3 Server-Section Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
13.4 Import-Section Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
13.5 Optimization Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
14 Merging Partitions
151
14.1 Merging Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
14.2 ETL Merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
15 Performance Optimizations
158
15.1 Execution Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
15.2 Careful Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
15.3 Partition Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
15.4 ORDER BY Bitmap Index Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . 165
15.5 Optimizing the Partition Access Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
15.6 Smart Query Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
15.7 JOIN Optimizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Page v
15.8 Query Rewrite Optimizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 15.9 Small Optimizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 15.10 Column Store Compressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 15.11 LIMIT optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 15.12 Parallel Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 15.13 Controlling the Number of Mapped Files . . . . . . . . . . . . . . . . . . . . . . . . . 184 15.14 Separation Aware Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
16 Socket Client Interface
199
16.1 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
16.2 Tooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
16.3 Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
16.4 Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
16.5 ASCII Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
16.6 XML Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
16.7 JSON Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
17 ODBC Client Interface
209
17.1 ODBC Configuration Brief . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
17.2 Installing ODBC Driver on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
17.3 Configuring Cisco ParStream ODBC Connection on Linux . . . . . . . . . . . . . . . 211
17.4 Installing ODBC Driver on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
17.5 Configuring Cisco ParStream ODBC Connection on Windows . . . . . . . . . . . . . 212
18 JDBC Client Interface
214
18.1 Installing JDBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
18.2 Configuring JDBC Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
19 Java Streaming Import Interface (JSII)
216
19.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
19.2 General Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
19.3 Java Driver Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
19.4 Using the Java Streaming Import Interface . . . . . . . . . . . . . . . . . . . . . . . . 218
19.5 Java driver for Streaming Import Interface Reference . . . . . . . . . . . . . . . . . . 223
20 External User-Defined Table Operators (xUDTO)
232
Page vi
20.1 Concept of Using User-Defined Table Operators (UDTO) . . . . . . . . . . . . . . . . 232 20.2 Enabling External Processing of xUDTOs . . . . . . . . . . . . . . . . . . . . . . . . 233 20.3 Using External User-Defined Table Operators . . . . . . . . . . . . . . . . . . . . . . 235 20.4 Integrating R Scripts as xUDTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
21 SQL Coverage
244
21.1 Supported Keywords, Functions, and Operators . . . . . . . . . . . . . . . . . . . . . 244
21.2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
21.3 Optimization Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
21.4 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
22 SQL Language Elements
263
22.1 Cisco ParStream SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
22.2 Supported SQL Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
23 SQL Data Types
267
23.1 Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
23.2 Integral Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
23.3 Floating-Point Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
23.4 Date and Time Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
23.5 String and Character types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
23.6 Blob Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
23.7 Bit-Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
23.8 MultiValues (Numeric Arrays) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
24 Table Statements
277
24.1 Overview of Table Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
24.2 CREATE TABLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
24.3 ALTER TABLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
24.4 DROP TABLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
25 SQL Functions
299
26 System Tables
306
26.1 Introduction of System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
26.2 Static Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
26.3 Schema and Configuration Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Page vii
26.4 Runtime Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
27 SQL Grammar
325
27.1 BNF Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
27.2 SQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
27.3 SELECT Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
27.4 INSERT Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
27.5 DELETE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
27.6 INSPECT Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
27.7 Schema Definition Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
27.8 Schema Manipulation Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
27.9 CALL Statement (Control Statements) . . . . . . . . . . . . . . . . . . . . . . . . . . 372
27.10 SET Statements (Session Statements) . . . . . . . . . . . . . . . . . . . . . . . . . . 373
27.11 ALTER SYSTEM Statements (System Statement) . . . . . . . . . . . . . . . . . . . . 375
27.12 User Administration Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
27.13 DBMS Job Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
28 Reserved Keywords
378
28.1 Reserved Standard SQL Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
28.2 Reserved Cisco ParStream Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . 381
29 Release Notes
384
29.1 Release Notes Version 6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
29.2 Release Notes Version 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
29.3 Release Notes Version 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
29.4 Release Notes Version 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
29.5 Release Notes Version 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
29.6 Release Notes Version 5.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
29.7 Release Notes Version 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
A Examples
391
A.1 Example `cluster' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
A.2 Example 'multivalue' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
A.3 Example `dynamiccolumns' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
A.4 Example `stringdistr' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Page viii
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.