I'm many exceptions I have encountered previously, here is one to start
with.
When I attempt to do a batch index, I delete the old index and recreate it.
I then will check several times to see if the index exists using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I would
get an exception if it didn't exist, now even not even specifying the name I
get the exception, I need to make sure the index exists before continuing
but this makes it impossible since the check itself throws the exception.
Not sure I understand exactly what you do and when you get an exception, can
you explain it a bit better? A few questions, how do you get a Client
instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to start
with.
When I attempt to do a batch index, I delete the old index and recreate it.
I then will check several times to see if the index exists using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I would
get an exception if it didn't exist, now even not even specifying the name I
get the exception, I need to make sure the index exists before continuing
but this makes it impossible since the check itself throws the exception.
verify index is created via the status request because I encountered
problems before where I would attempt to index but the index was not yet
available/created and would throw the exception so I put this check in.
My first attempt to check would include the index name in the status request
but that to would throw an exception, so I just do the request without any
name and it would work.
Now it throws the exception.
Not sure I understand exactly what you do and when you get an exception,
can you explain it a bit better? A few questions, how do you get a Client
instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to start
with.
When I attempt to do a batch index, I delete the old index and recreate
it. I then will check several times to see if the index exists using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I would
get an exception if it didn't exist, now even not even specifying the name I
get the exception, I need to make sure the index exists before continuing
but this makes it impossible since the check itself throws the exception.
This might be because the index was created, but shards have not been
allocated to it yet. What you can do is use the cluster health API, here is
an example (using the new Java API):
verify index is created via the status request because I encountered
problems before where I would attempt to index but the index was not yet
available/created and would throw the exception so I put this check in.
My first attempt to check would include the index name in the status
request but that to would throw an exception, so I just do the request
without any name and it would work.
Now it throws the exception.
Not sure I understand exactly what you do and when you get an exception,
can you explain it a bit better? A few questions, how do you get a Client
instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to start
with.
When I attempt to do a batch index, I delete the old index and recreate
it. I then will check several times to see if the index exists using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I would
get an exception if it didn't exist, now even not even specifying the name I
get the exception, I need to make sure the index exists before continuing
but this makes it impossible since the check itself throws the exception.
This might be because the index was created, but shards have not been
allocated to it yet. What you can do is use the cluster health API, here is
an example (using the new Java API):
verify index is created via the status request because I encountered
problems before where I would attempt to index but the index was not yet
available/created and would throw the exception so I put this check in.
My first attempt to check would include the index name in the status
request but that to would throw an exception, so I just do the request
without any name and it would work.
Now it throws the exception.
Not sure I understand exactly what you do and when you get an exception,
can you explain it a bit better? A few questions, how do you get a Client
instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to start
with.
When I attempt to do a batch index, I delete the old index and recreate
it. I then will check several times to see if the index exists using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I
would get an exception if it didn't exist, now even not even specifying the
name I get the exception, I need to make sure the index exists before
continuing but this makes it impossible since the check itself throws the
exception.
Let me just explain what it does, it will wait for 30 seconds (the default
timeout value) for the cluster to be in yellow state, which means at least
one shard per shard replica set has been allocated to a node.
This might be because the index was created, but shards have not been
allocated to it yet. What you can do is use the cluster health API, here is
an example (using the new Java API):
verify index is created via the status request because I encountered
problems before where I would attempt to index but the index was not yet
available/created and would throw the exception so I put this check in.
My first attempt to check would include the index name in the status
request but that to would throw an exception, so I just do the request
without any name and it would work.
Now it throws the exception.
Not sure I understand exactly what you do and when you get an exception,
can you explain it a bit better? A few questions, how do you get a Client
instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to start
with.
When I attempt to do a batch index, I delete the old index and recreate
it. I then will check several times to see if the index exists using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I
would get an exception if it didn't exist, now even not even specifying the
name I get the exception, I need to make sure the index exists before
continuing but this makes it impossible since the check itself throws the
exception.
Let me just explain what it does, it will wait for 30 seconds (the default
timeout value) for the cluster to be in yellow state, which means at least
one shard per shard replica set has been allocated to a node.
This might be because the index was created, but shards have not been
allocated to it yet. What you can do is use the cluster health API, here is
an example (using the new Java API):
verify index is created via the status request because I encountered
problems before where I would attempt to index but the index was not yet
available/created and would throw the exception so I put this check in.
My first attempt to check would include the index name in the status
request but that to would throw an exception, so I just do the request
without any name and it would work.
Now it throws the exception.
Not sure I understand exactly what you do and when you get an
exception, can you explain it a bit better? A few questions, how do you get
a Client instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to
start with.
When I attempt to do a batch index, I delete the old index and
recreate it. I then will check several times to see if the index exists
using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I
would get an exception if it didn't exist, now even not even specifying the
name I get the exception, I need to make sure the index exists before
continuing but this makes it impossible since the check itself throws the
exception.
Let me just explain what it does, it will wait for 30 seconds (the default
timeout value) for the cluster to be in yellow state, which means at least
one shard per shard replica set has been allocated to a node.
This might be because the index was created, but shards have not been
allocated to it yet. What you can do is use the cluster health API, here is
an example (using the new Java API):
verify index is created via the status request because I encountered
problems before where I would attempt to index but the index was not yet
available/created and would throw the exception so I put this check in.
My first attempt to check would include the index name in the status
request but that to would throw an exception, so I just do the request
without any name and it would work.
Now it throws the exception.
Not sure I understand exactly what you do and when you get an
exception, can you explain it a bit better? A few questions, how do you get
a Client instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to
start with.
When I attempt to do a batch index, I delete the old index and
recreate it. I then will check several times to see if the index exists
using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I
would get an exception if it didn't exist, now even not even specifying the
name I get the exception, I need to make sure the index exists before
continuing but this makes it impossible since the check itself throws the
exception.
I was following the same pattern as on the create where I would test using
an IndicesStatusRequest after the DeleteIndexRequest to verify the delete.
If this is not needed it is good to know.
Let me just explain what it does, it will wait for 30 seconds (the
default timeout value) for the cluster to be in yellow state, which means at
least one shard per shard replica set has been allocated to a node.
This might be because the index was created, but shards have not been
allocated to it yet. What you can do is use the cluster health API, here is
an example (using the new Java API):
verify index is created via the status request because I
encountered problems before where I would attempt to index but the index was
not yet available/created and would throw the exception so I put this check
in.
My first attempt to check would include the index name in the status
request but that to would throw an exception, so I just do the request
without any name and it would work.
Now it throws the exception.
Not sure I understand exactly what you do and when you get an
exception, can you explain it a bit better? A few questions, how do you get
a Client instance, out of a Node?
I'm many exceptions I have encountered previously, here is one to
start with.
When I attempt to do a batch index, I delete the old index and
recreate it. I then will check several times to see if the index exists
using:
statusResponse = client.admin().indices().status(new
IndicesStatusRequest()).actionGet() // If i specify a name for an index that
doesn't exist I get an exception.
Before if I specified the index name I had created in the request I
would get an exception if it didn't exist, now even not even specifying the
name I get the exception, I need to make sure the index exists before
continuing but this makes it impossible since the check itself throws the
exception.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.