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


Java SiddhiAppCreationException类代码示例

本文整理汇总了Java中org.wso2.siddhi.core.exception.SiddhiAppCreationException的典型用法代码示例。如果您正苦于以下问题:Java SiddhiAppCreationException类的具体用法?Java SiddhiAppCreationException怎么用?Java SiddhiAppCreationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: testClusTree2D_3

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_3() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate noOfClusters to be constant");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double, noOfClusters int);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(noOfClusters, 10, 20, 5, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("noOfClusters has to be a constant but " +
                "found org.wso2.siddhi.core.executor.VariableExpressionExecutor"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例2: testClusTree2D_4

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_4() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate maxIterations to be constant");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double, maxIterations int);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, maxIterations, 20, 5, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("Maximum iterations has to be a constant but " +
                "found org.wso2.siddhi.core.executor.VariableExpressionExecutor"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例3: testClusTree2D_5

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_5() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate " +
            "noOfEventsToRefreshMacroModel to be constant");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double, noOfEventsToRefreshMacroModel int);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, noOfEventsToRefreshMacroModel, " +
                    "5, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("noOfEventsToRefreshMacroModel has to be a " +
                "constant but found org.wso2.siddhi.core.executor.VariableExpressionExecutor"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:23,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例4: testClusTree2D_6

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_6() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate maxHeightOfTree to be constant");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double, maxHeightOfTree int);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, 20, maxHeightOfTree, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("maxHeightOfTree has to be a constant but " +
                "found org.wso2.siddhi.core.executor.VariableExpressionExecutor"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例5: testClusTree2D_7

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_7() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate horizon to be constant");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double, horizon int);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, 20, 5, horizon, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("horizon has to be a constant but found " +
                "org.wso2.siddhi.core.executor.VariableExpressionExecutor"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例6: testClusTree2D_9

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_9() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate attribute_0 to be variable");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, 20, 5, 50, 8, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("6th parameter is not an attribute " +
                "(VariableExpressionExecutor) present in the stream definition. Found a " +
                "org.wso2.siddhi.core.executor.ConstantExpressionExecutor"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:22,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例7: testClusTree2D_10

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_10() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate attribute_1 to be variable");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, 20, 5, 50, x, 3.1f) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("7th parameter is not an attribute " +
                "(VariableExpressionExecutor) present in the stream definition. Found a " +
                "org.wso2.siddhi.core.executor.ConstantExpressionExecutor"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:22,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例8: testClusTree2D_11

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_11() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate noOfClusters to be int");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2.1, 10, 20, 5, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("noOfClusters should be of type int but " +
                "found DOUBLE"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例9: testClusTree2D_12

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_12() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate maxIterations to be int");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10.3f, 20, 5, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("Maximum iterations should be of type int " +
                "but found FLOAT"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例10: testClusTree2D_13

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_13() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate maxHeightOfTree " +
            "to be int");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, 20, 5.4, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("maxHeightOfTree should be of type int but " +
                "found DOUBLE"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:22,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例11: testClusTree2D_15

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_15() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case for incorrect type stream definition");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y String);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, 20, 5, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, attribute_0, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("model.features in 7th parameter is not a " +
                "numerical type attribute. Found STRING. Check the input stream definition."));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例12: testClusTree2D_17

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_17() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate horizon to be int");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, 20, 2, 50.3f, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("horizon should be of type int but found FLOAT"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:20,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例13: testClusTree2D_18

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_18() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate noOfClusters to be positive");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(-2, 10, 20, 2, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("noOfClusters should be a positive integer " +
                "but found -2"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例14: testClusTree2D_19

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_19() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate maxIterations to be positive");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, -10, 20, 2, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("maxIterations should be a positive integer " +
                "but found -10"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:21,代码来源:ClusTreeStreamProcessorExtensionTest.java

示例15: testClusTree2D_20

import org.wso2.siddhi.core.exception.SiddhiAppCreationException; //导入依赖的package包/类
@Test
public void testClusTree2D_20() throws Exception {
    logger.info("ClusTreeStreamProcessorExtension Test - Test case to validate noOfEventsToRefreshMacroModel " +
            "to be positive");
    SiddhiManager siddhiManager = new SiddhiManager();
    String inputStream = "define stream InputStream (x double, y double);";

    String query = (
            "@info(name = 'query1') " +
                    "from InputStream#streamingml:clusTree(2, 10, -20, 2, 50, x, y) " +
                    "select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y " +
                    "insert into OutputStream;");
    try {
        SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(inputStream + query);
    } catch (Exception e) {
        logger.info("Error caught");
        AssertJUnit.assertTrue(e instanceof SiddhiAppCreationException);
        AssertJUnit.assertTrue(e.getCause().getMessage().contains("noOfEventsToRefreshMacroModel should be a " +
                "positive integer but found -20"));
    }
}
 
开发者ID:wso2-extensions,项目名称:siddhi-gpl-execution-streamingml,代码行数:22,代码来源:ClusTreeStreamProcessorExtensionTest.java


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