Package org.elasticsearch.hadoop

Examples of org.elasticsearch.hadoop.EsHadoopIllegalArgumentException


            log.trace("Writing out tuple " + t);
        }
        try {
            writer.write(null, pigTuple);
        } catch (InterruptedException ex) {
            throw new EsHadoopIllegalArgumentException("interrupted", ex);
        }
    }
View Full Code Here


            DataByteArray dba = (DataByteArray) object;
            to.bytes(dba.get(), dba.size());
            return;
        }

        throw new EsHadoopIllegalArgumentException(String.format("Cannot handle Pig type [%s]; expecting [%s,%s]", object.getClass(), String.class, DataByteArray.class));
    }
View Full Code Here

            // fall back to file system
            Path p = new Path(resource);
            FileSystem fs = p.getFileSystem(conf);
            return fs.open(p);
        } catch (IOException ex) {
            throw new EsHadoopIllegalArgumentException(String.format("Cannot open stream for resource %s", resource));
        }
    }
View Full Code Here

public abstract class Settings {

    public String getNodes() {
        String host = getProperty(ES_HOST);
        if (StringUtils.hasText(host)) {
            throw new EsHadoopIllegalArgumentException(String.format("`%s` property has been deprecated - use `%s` instead", ES_HOST, ES_NODES));
        }

        return getProperty(ES_NODES, ES_NODES_DEFAULT);
    }
View Full Code Here

        Map<String, String> columnNames = HiveUtils.columnMap(settings);
        // replace column name with _colX (which is what Hive uses during serialization)
        fieldName = columnNames.get(fl.toLowerCase(Locale.ENGLISH));

        if (!settings.getInputAsJson() && !StringUtils.hasText(fieldName)) {
            throw new EsHadoopIllegalArgumentException(
                    String.format(
                            "Cannot find field [%s] in mapping %s ; maybe a value was specified without '<','>' or there is a typo?",
                            fl, columnNames.keySet()));
        }
    }
View Full Code Here

                HiveBytesArrayWritable hbaw = ((HiveBytesArrayWritable) w);
                repository.writeProcessedToIndex(hbaw.getContent());
            }
            else {
                // we could allow custom BAs
                throw new EsHadoopIllegalArgumentException(String.format("Unexpected type; expected [%s], received [%s]", HiveBytesArrayWritable.class, w));
            }
        }
View Full Code Here

            return new PropertiesSettings((Properties) configuration);
        }
        if (HADOOP_CONFIGURATION != null && HADOOP_CONFIGURATION.isInstance(configuration)) {
            return FromHadoopConfiguration.create(configuration);
        }
        throw new EsHadoopIllegalArgumentException("Don't know how to create Settings from configuration " + configuration);
    }
View Full Code Here

                                    break;
                                case VALUE_STRING:
                                    value = parser.text();
                                    break;
                                default:
                                    throw new EsHadoopIllegalArgumentException(String.format(
                                            "Incorrect parsing; expected value but found [%s]", parser.currentToken()));
                                }
                            }
                            matcher.value = value;
                        }
View Full Code Here

                HiveBytesArrayWritable hbaw = ((HiveBytesArrayWritable) w);
                repository.writeProcessedToIndex(hbaw.getContent());
            }
            else {
                // we could allow custom BAs
                throw new EsHadoopIllegalArgumentException(String.format("Unexpected type; expected [%s], received [%s]", HiveBytesArrayWritable.class, w));
            }
        }
View Full Code Here

                for (String string : configuration) {
                    // replace ; with line separators
                    properties.load(new StringReader(string));
                }
            } catch (IOException ex) {
                throw new EsHadoopIllegalArgumentException("Cannot parse options " + Arrays.toString(configuration), ex);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.hadoop.EsHadoopIllegalArgumentException

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.