HITACHI Inspire The Next

uCosminexus Stream Data Platform - Application Framework

Application Development Guide

3020-3-V03(E)


Contents

Notices
Preface
Part 1: Before Reading This Manual
1. Overview of Application Development in Stream Data Platform - AF
1.1 Flow from introduction to operation
1.2 Organization of this manual
1.3 Overview of application development
1.3.1 What you can define in a query
1.3.2 What you can do when creating a custom adaptor
Part 2: CQL Programming
2. Using CQL to Define Queries
2.1 CQL structure
2.2 Generating input relations using window operations
2.2.1 Types of window operations
2.2.2 Window operation examples
2.3 Data extraction using a relational operation
2.3.1 Relational operation types
2.3.2 Example of a linking process
2.3.3 Example of processing using an aggregate function
2.3.4 Notes on using the linking process and the ROWS window together
2.4 Conversion into output stream data using stream operation
2.4.1 Stream operation types
2.4.2 Stream operation examples
2.5 Limiting memory usage by specifying time division
2.6 Definition examples
2.6.1 Basic query definition example
2.6.2 Definition examples in which time division is specified
3. CQL Basic Items and Data Types
3.1 Defining queries using CQL
3.1.1 CQL format
3.1.2 Characters that can be used in CQL
3.1.3 Symbols used in the explanation of CQL syntax
3.2 Specifying basic items in CQL
3.2.1 Specifying keywords
3.2.2 Specifying numeric values
3.2.3 Delimiters
3.2.4 Specifying names
3.2.5 Name qualification
3.2.6 Specifying constants
3.3 CQL data types
3.3.1 Mapping between CQL data types and Java data types
3.3.2 Notes on the DECIMAL and NUMERIC types
3.4 Data comparison
3.4.1 Combinations of data types that can be compared
3.4.2 Notes on comparing data
3.5 Notes on query definitions and limit values
3.5.1 Notes on query definitions
3.5.2 Limit values applicable to query definitions
4. CQL Reference
4.1 Format used for explaining the CQL syntax
4.2 CQL list
4.3 Definition CQL
4.3.1 REGISTER STREAM clause (stream definition)
4.3.2 REGISTER QUERY clause (query definition)
4.3.3 REGISTER QUERY_ATTRIBUTE clause (time division specification)
4.4 Data manipulation CQL
4.4.1 Inquiry
4.4.2 Stream clause
4.4.3 Relation expression
4.4.4 SELECT clause
4.4.5 FROM clause
4.4.6 WHERE clause
4.4.7 GROUP BY clause
4.4.8 HAVING clause
4.4.9 UNION clause
4.4.10 Selection list
4.4.11 Select expression
4.4.12 Aggregate functions
4.4.13 Column specification list
4.4.14 Relation reference
4.4.15 Window specification
4.4.16 Time specification
4.4.17 Search condition
4.4.18 Comparison predicate
4.4.19 Value expression
4.4.20 Constant
5. Query Definition Samples
5.1 Types of query definition samples
Part 3: Creating Custom Adaptors
6. Creating Custom Adaptors
6.1 Types of custom adaptors that can be created
6.1.1 Data transmission applications and data reception applications
6.1.2 Classification based on how data is sent and received (RMI connection custom adaptor and in-process connection custom adaptor)
6.2 Creating an RMI connection custom adaptor
6.2.1 Sending stream data (RMI connection custom adaptor)
6.2.2 Receiving query result data (RMI connection custom adaptor)
6.3 Creating an in-process connection custom adaptor
6.3.1 Sending stream data (in-process connection custom adaptor)
6.3.2 Receiving query result data (in-process connection custom adaptor)
6.3.3 Notes
6.4 Other processes that may need to be implemented in custom adaptors
6.4.1 Detecting the trigger for terminating a data reception application (data processing termination notification)
6.4.2 Specifying time information in the data source mode
6.4.3 Preventing queue overflow
6.5 Compilation procedure
6.6 Notes on creating custom adaptors
7. APIs for Sending and Receiving Data
7.1 Syntax of APIs for sending and receiving data
7.2 List of APIs for sending and receiving data
7.3 SDPConnector interface (common API)
close() method
isClosed() method
openStreamInput(String group_name,String stream_name) method
openStreamOutput(String group_name,String stream_name) method
7.4 SDPConnectorFactory class (for RMI connection)
connect() method
7.5 StreamEventListener interface (for in-process connection)
onEvent(StreamTuple tuple) method
7.6 StreamInprocessUP interface (for in-process connection)
execute(SDPConnector con) method
stop() method
7.7 StreamInput interface (common API)
close() method
getFreeQueueSize() method
getMaxQueueSize() method
isStarted() method
put(ArrayList<StreamTuple> tuple_list) method
put(StreamTuple tuple) method
putEnd() method
7.8 StreamOutput interface (common API)
close() method
get() method
get(int count) method
get(int count, long timeout) method
getAll() method
getAll(long timeout) method
getFreeQueueSize() method
getMaxQueueSize() method
registerForNotification(StreamEventListener n) method
unregisterForNotification(StreamEventListener n) method
7.9 StreamTime class (common API)
equals(StreamTime when) method
getTimeMillis() method
hashCode() method
toString() method
7.10 StreamTuple class (common API)
StreamTuple(Object[] dataArray) constructor
equals(Object obj) method
getDataArray() method
getSystemTime() method
hashCode() method
toString() method
7.11 Exception class (common API)
SDPClientException class (common API)
SDPClientFreeInputQueueSizeThresholdOverException class (common API)
SDPClientFreeInputQueueSizeLackException class (common API)
8. Sample Programs Using APIs for Sending and Receiving Data
8.1 Sample program configuration
8.2 Sample program for an RMI connection custom adaptor
8.2.1 Procedure for executing the sample program for an RMI connection custom adaptor
8.2.2 Query group definition content (RMI connection custom adaptor)
8.2.3 Content of the RMI connection data transmission application
8.2.4 Content of the RMI connection data reception application
8.3 Sample program for an in-process connection custom adaptor
8.3.1 Procedure for executing the sample program for an in-process connection custom adaptor
8.3.2 Query group definition content (in-process connection custom adaptor)
8.3.3 Content of the in-process connection transmission/reception control application
8.3.4 Content of the in-process connection data transmission application
8.3.5 Content of the in-process connection data reception application (polling method)
Appendix
A. Reference Material for This Manual
A.1 Related publications
A.2 Conventions: Abbreviations for product names
A.3 Conventions: Acronyms
A.4 Conventions: KB, MB, GB, and TB
Index