title: Solr core creation on HDFS failing
body: <p>I am trying to make Solr 4.7.2  work with HDFS (using Hadoop 2.4.1).</p>
  
  <p>Here is <code>solrconfig.xml</code>:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;config&gt;
  &lt;luceneMatchVersion&gt;LUCENE_47&lt;/luceneMatchVersion&gt;
  &lt;lockType&gt;hdfs&lt;/lockType&gt;
  &lt;unlockOnStartup&gt;true&lt;/unlockOnStartup&gt;
  &lt;writeLockTimeout&gt;20000&lt;/writeLockTimeout&gt;
  &lt;commitLockTimeout&gt;10000&lt;/commitLockTimeout&gt;
  &lt;directoryFactory name="DirectoryFactory" class="solr.HdfsDirectoryFactory"&gt;
    &lt;str name="solr.hdfs.home"&gt;hdfs://localhost:54310/solr&lt;/str&gt;
    &lt;bool name="solr.hdfs.blockcache.enabled"&gt;true&lt;/bool&gt;
    &lt;int name="solr.hdfs.blockcache.slab.count"&gt;1&lt;/int&gt;
    &lt;bool name="solr.hdfs.blockcache.direct.memory.allocation"&gt;true&lt;/bool&gt;
    &lt;int name="solr.hdfs.blockcache.blocksperbank"&gt;16384&lt;/int&gt;
    &lt;bool name="solr.hdfs.blockcache.read.enabled"&gt;true&lt;/bool&gt;
    &lt;bool name="solr.hdfs.blockcache.write.enabled"&gt;true&lt;/bool&gt;
    &lt;bool name="solr.hdfs.nrtcachingdirectory.enable"&gt;true&lt;/bool&gt;
    &lt;int name="solr.hdfs.nrtcachingdirectory.maxmergesizemb"&gt;16&lt;/int&gt;
    &lt;int name="solr.hdfs.nrtcachingdirectory.maxcachedmb"&gt;192&lt;/int&gt;
  &lt;/directoryFactory&gt;
  &lt;requestHandler name='standard' class=
  'solr.StandardRequestHandler' default='true' /&gt;
  &lt;requestHandler name='/update' class=
  'solr.UpdateRequestHandler' /&gt;
  &lt;requestHandler name='/admin/' class=
  'org.apache.solr.handler.admin.AdminHandlers' /&gt;
  &lt;admin&gt;
  &lt;defaultQuery&gt;*:*&lt;/defaultQuery&gt;
  &lt;/admin&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>Once I start Solr server, it throws the exception:</p>
  
  <pre><code>hdp1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error opening new searcher
  </code></pre>
  
  <p>I tried to debug and found the following error in jetty log: </p>
  
  <pre><code>Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: 
  
  NativeFSLock@hdfs:/localhost:54310/solr/hdp1/data/index/HdfsDirectory@1d5821fa lockFactory=NativeFSLockFactory@hdfs:/localhost:54310/solr/hdp1/data/index-write.lock: java.io.FileNotFoundException: hdfs:/localhost:54310/solr/hdp1/data/index/HdfsDirectory@1d5821fa lockFactory=NativeFSLockFactory@hdfs:/localhost:54310/solr/hdp1/data/index-write.lock (No such file or directory)
  </code></pre>
  
  <p>It's able to create directories on HDFS, but somehow failing while creating/accessing<br>
  the index.</p>