当前位置: 首页>>代码示例>>Java>>正文


Java ConnectorException类代码示例

本文整理汇总了Java中com.stratio.crossdata.common.exceptions.ConnectorException的典型用法代码示例。如果您正苦于以下问题:Java ConnectorException类的具体用法?Java ConnectorException怎么用?Java ConnectorException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConnectorException类属于com.stratio.crossdata.common.exceptions包,在下文中一共展示了ConnectorException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public QueryResult execute(LogicalWorkflow workflow) throws ConnectorException {
    ResultSet resultSet = new ResultSet();
    Project project = (Project) workflow.getInitialSteps().iterator().next();
    IRCManager engine = managers.get(project.getClusterName());
    List<Message> messages = engine.getMessagesFromChannel(project.getTableName().getName());
    LogicalStep nextStep = project.getNextStep();
    while (nextStep != null) {
        if (nextStep instanceof Filter) {
            Filter filter = (Filter) nextStep;
            messages = this.applyFilter(messages, filter);
        } else if (nextStep instanceof Select) {
            Select select = (Select) nextStep;
            resultSet = computeResultSet(messages, select);
        }
        nextStep = nextStep.getNextStep();
    }

    return QueryResult.createQueryResult(resultSet);
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:21,代码来源:IRCQueryEngine.java

示例2: insert

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override public void insert(ClusterName targetCluster, TableMetadata targetTable, Row row)
        throws ConnectorException {
    Object message= row.getCell("message");
    if(message==null){
        throw new ConnectorException("You must add message column in the insert clause.");
    }
    IRCManager manager= managers.get(targetCluster);
    manager.sendMessage(targetTable.getName().getName(),message.toString());
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:10,代码来源:IRCStorageEngine.java

示例3: createIndex

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public void createIndex(ClusterName targetCluster, IndexMetadata indexMetadata)
        throws ConnectorException {
    if(indexMetadata.getColumns().size()>1){
        throw new ConnectorException("Only supported one column index");
    }
    if(!indexMetadata.getColumns().containsKey("message")){
        throw new ConnectorException("Only supported index in the column message");
    }
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:11,代码来源:IRCMetadataEngine.java

示例4: twoProjectsJoinedAndSelectWithGroupByTest

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Test
public void twoProjectsJoinedAndSelectWithGroupByTest() throws ConnectorException {

    // Input data
    List<LogicalStep> stepList = new LinkedList<>();
    Project projectLeft = createProject(CASSANDRA_CLUSTERNAME_CONSTANT, KEYSPACE, MYTABLE1_CONSTANT,
                    Arrays.asList(ARTIST_CONSTANT, DESCRIPTION_CONSTANT, TITLE_CONSTANT, YEAR_CONSTANT));
    Project projectRight = createProject(CASSANDRA_CLUSTERNAME_CONSTANT, KEYSPACE, MYTABLE2_CONSTANT,
                    Arrays.asList(ARTIST_CONSTANT, AGE_CONSTANT));
    Join join = createJoin("joinId", createColumn(KEYSPACE, MYTABLE1_CONSTANT, ARTIST_CONSTANT),
                    createColumn(KEYSPACE, MYTABLE2_CONSTANT, ARTIST_CONSTANT));
    GroupBy groupBy = createGroupBy(Arrays.asList(createColumn(KEYSPACE, MYTABLE1_CONSTANT, ARTIST_CONSTANT)));
    groupBy.setNextStep(createSelect(Arrays.asList(createColumn(KEYSPACE, MYTABLE1_CONSTANT, ARTIST_CONSTANT)),
                    Arrays.asList(ARTIST_ALIAS_CONSTANT)));
    projectLeft.setNextStep(join);
    projectRight.setNextStep(join);
    join.setNextStep(groupBy);
    // Two initial steps
    stepList.add(projectLeft);
    stepList.add(projectRight);
    LogicalWorkflow logicalWorkflow = new LogicalWorkflow(stepList);
    // Execution
    QueryResult result = deepQueryEngine.execute(logicalWorkflow);
    // Assertions
    List<ColumnMetadata> columnsMetadata = result.getResultSet().getColumnMetadata();
    List<Row> rowsList = result.getResultSet().getRows();
    // Checking results number
    assertEquals("Wrong number of rows metadata", 1, columnsMetadata.size());
    assertEquals("Wrong number of rows", 36, rowsList.size());
    // Checking metadata
    assertEquals("Author expected", ARTIST_ALIAS_CONSTANT, columnsMetadata.get(0).getName().getAlias());
    assertEquals("mytable1 expected", KEYSPACE + "." + MYTABLE1_CONSTANT, columnsMetadata.get(0).getName()
                    .getTableName().getQualifiedName());
    // Checking rows
    for (Row row : rowsList) {
        assertEquals("Wrong number of columns in the row", 1, row.size());
        assertNotNull("Expecting author column in row", row.getCell(ARTIST_ALIAS_CONSTANT));
    }
}
 
开发者ID:Stratio,项目名称:stratio-connector-deep,代码行数:40,代码来源:DeepConnectorCassandraFT.java

示例5: delete

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override public void delete(ClusterName targetCluster, TableName tableName, Collection<Filter> whereClauses)
        throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:5,代码来源:IRCStorageEngine.java

示例6: update

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override public void update(ClusterName targetCluster, TableName tableName, Collection<Relation> assignments,
        Collection<Filter> whereClauses) throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:5,代码来源:IRCStorageEngine.java

示例7: truncate

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override public void truncate(ClusterName targetCluster, TableName tableName) throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:4,代码来源:IRCStorageEngine.java

示例8: createCatalog

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public void createCatalog(ClusterName targetCluster, CatalogMetadata catalogMetadata)
        throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:6,代码来源:IRCMetadataEngine.java

示例9: createTable

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public void createTable(ClusterName targetCluster, TableMetadata tableMetadata)
        throws ConnectorException {
    IRCManager manager = managers.get(targetCluster);
    manager.joinChannel(tableMetadata.getName().getName());
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:7,代码来源:IRCMetadataEngine.java

示例10: dropCatalog

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public void dropCatalog(ClusterName targetCluster, CatalogName name) throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:5,代码来源:IRCMetadataEngine.java

示例11: alterTable

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public void alterTable(ClusterName targetCluster, TableName name, AlterOptions alterOptions)
        throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:6,代码来源:IRCMetadataEngine.java

示例12: asyncExecute

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public void asyncExecute(String queryId, LogicalWorkflow workflow, IResultHandler resultHandler)
        throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:6,代码来源:IRCQueryEngine.java

示例13: stop

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override
public void stop(String queryId) throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:aagea,项目名称:crossdata-connector-irc,代码行数:5,代码来源:IRCQueryEngine.java

示例14: execute

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override public QueryResult execute(String queryId, LogicalWorkflow workflow) throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:Stratio,项目名称:crossdata-connector-skeleton,代码行数:4,代码来源:SkeletonQueryEngine.java

示例15: pagedExecute

import com.stratio.crossdata.common.exceptions.ConnectorException; //导入依赖的package包/类
@Override public void pagedExecute(String queryId, LogicalWorkflow workflow, IResultHandler resultHandler,
        int pageSize) throws ConnectorException {
    throw new UnsupportedException("Method not implemented");
}
 
开发者ID:Stratio,项目名称:crossdata-connector-skeleton,代码行数:5,代码来源:SkeletonQueryEngine.java


注:本文中的com.stratio.crossdata.common.exceptions.ConnectorException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。