Package com.impetus.kundera.index

Examples of com.impetus.kundera.index.IndexingException


    }

    @Test
    public void testIndexingException()
    {
        IndexingException exception = new IndexingException("Error with string");
        Assert.assertNotNull(exception);
       
        exception = new IndexingException(new RuntimeException());
        Assert.assertNotNull(exception);
   
        exception = new IndexingException("KunderaTests",new RuntimeException());
        Assert.assertNotNull(exception);
       
        exception = new IndexingException();
        Assert.assertNotNull(exception);
    }
View Full Code Here


            List<Node> nodes = indexerProperties.getNodes();

            if (nodes == null || (nodes != null && nodes.isEmpty()))
            {
                log.error("Nodes should not be empty/null");
                throw new IndexingException("Nodes should not be empty/null");
            }
            else
            {
                if (client == null)
                {
                    client = new TransportClient();
                }
                for (Node node : nodes)
                {
                    Properties properties = node.getProperties();
                    if (properties != null)
                    {
                        if (properties.getProperty("host") == null
                                || !StringUtils.isNumeric(properties.getProperty("port"))
                                || properties.getProperty("port").isEmpty())
                        {
                            log.error("Host or port should not be null / port should be numeric");
                            throw new IllegalArgumentException(
                                    "Host or port should not be null / port should be numeric");
                        }
                        ((TransportClient) client).addTransportAddress(new InetSocketTransportAddress(properties
                                .getProperty("host"), Integer.parseInt(properties.getProperty("port"))));
                    }
                }
            }
        }
        else
        {
            log.error("No indexer setting provided, please provide valid indexer settings in esindexer.xml");
            throw new IndexingException(
                    "No indexer setting provided, please provide valid indexer settings in esindexer.xml");
        }
    }
View Full Code Here

                }
            }
            catch (IllegalStateException e)
            {
                log.error("Unable to insert records into inverted index, Caused by: .", e);
                throw new IndexingException(e);
            }
            catch (InvalidRequestException e)
            {
                log.error("Unable to insert records into inverted index, Caused by: .", e);
                throw new IndexingException(e);
            }
            catch (TException e)
            {
                log.error("Unable to insert records into inverted index, Caused by: .", e);
                throw new IndexingException(e);
            }
            finally
            {
                thriftClient.releaseConnection(conn);
            }
View Full Code Here

                    new ColumnParent(columnFamilyName), colPredicate, consistencyLevel);
        }
        catch (InvalidRequestException e)
        {
            log.error("Unable to search from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (UnavailableException e)
        {
            log.error("Unable to search from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (TimedOutException e)
        {
            log.error("Unable to search from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (TException e)
        {
            log.error("Unable to search from inverted index, Caused by: ", e);
            throw new IndexingException(e);
        }
        finally
        {
            thriftClient.releaseConnection(conn);
        }
View Full Code Here

            cosc = conn.getClient().get(ByteBuffer.wrap(rowKey.getBytes()), cp, consistencyLevel);
        }
        catch (InvalidRequestException e)
        {
            log.error("Unable to search from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (NotFoundException e)
        {
            log.warn("Not found any record in inverted index table.");
        }
        catch (UnavailableException e)
        {
            log.error("Unable to search from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (TimedOutException e)
        {
            log.error("Unable to search from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (TException e)
        {
            log.error("Unable to search from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        finally
        {
            thriftClient.releaseConnection(conn);
        }
View Full Code Here

                    consistencyLevel);
        }
        catch (InvalidRequestException e)
        {
            log.error("Unable to delete data from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (UnavailableException e)
        {
            log.error("Unable to delete data from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (TimedOutException e)
        {
            log.error("Unable to delete data from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        catch (TException e)
        {
            log.error("Unable to delete data from inverted index, Caused by: .", e);
            throw new IndexingException(e);
        }
        finally
        {
            thriftClient.releaseConnection(conn);
        }
View Full Code Here

TOP

Related Classes of com.impetus.kundera.index.IndexingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.