Examples of IndexingException


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

Examples of com.impetus.kundera.index.IndexingException

            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

Examples of com.impetus.kundera.index.IndexingException

                }
            }
            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

Examples of com.impetus.kundera.index.IndexingException

                    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

Examples of com.impetus.kundera.index.IndexingException

            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

Examples of com.impetus.kundera.index.IndexingException

                    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

Examples of net.nutch.indexer.IndexingException

    // parse the url to get the host name
    URL url;                                     
    try {
      url = new URL(fo.getUrl().toString());
    } catch (MalformedURLException e) {
      throw new IndexingException(e);
    }

    // add host as un-stored, indexed and un-tokenized
    doc.add(new Field("site", url.getHost(), false, true, false));
View Full Code Here

Examples of org.apache.nutch.indexer.IndexingException

    String host = null;
    try {
      URL u = new URL(url.toString());
      host = u.getHost();
    } catch (MalformedURLException e) {
      throw new IndexingException(e);
    }

    if (host != null) {
      // add host as un-stored, indexed and tokenized
      doc.add(new Field("host", host, Field.Store.NO, Field.Index.TOKENIZED));
View Full Code Here

Examples of org.apache.nutch.indexer.IndexingException

        doc.add("domain", URLUtil.getDomainName(u));
      }
     
      host = u.getHost();
    } catch (MalformedURLException e) {
      throw new IndexingException(e);
    }

    if (host != null) {
      doc.add("host", host);
    }
View Full Code Here

Examples of org.apache.nutch.indexer.IndexingException

    String host = null;
    try {
      URL u = new URL(url.toString());
      host = u.getHost();
    } catch (MalformedURLException e) {
      throw new IndexingException(e);
    }

    if (host != null) {
      // add host as un-stored, indexed and tokenized
      doc.add(new Field("host", host, Field.Store.NO, Field.Index.TOKENIZED));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.