You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "mike-tr-adamson (via GitHub)" <gi...@apache.org> on 2023/06/27 14:34:33 UTC

[GitHub] [cassandra] mike-tr-adamson commented on a diff in pull request #2451: CASSANDRA-18494 Upgrade lucene-core library to the latest stable version

mike-tr-adamson commented on code in PR #2451:
URL: https://github.com/apache/cassandra/pull/2451#discussion_r1243857894


##########
src/java/org/apache/cassandra/index/sai/disk/oldlucene/ByteArrayIndexInput.java:
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.index.sai.disk.oldlucene;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Locale;
+
+import org.apache.lucene.store.IndexInput;
+import org.apache.lucene.store.RandomAccessInput;
+
+/**
+ * A {@link IndexInput} backed by a byte array.  Copied from Lucene 7.5.
+ *
+ * (ByteBufferIndexInput looks at first glance like a modern replacement for this, but
+ * it's really only intended to be used for reading mmapped buffers.)
+ */
+public final class ByteArrayIndexInput extends IndexInput implements RandomAccessInput

Review Comment:
   This isn't needed because the only use of the class in `MetadataSource` can be replaced with `ByteArrayDataInput` which looks to still exist in 9.x.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org