You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2017/09/21 06:34:58 UTC
[geode] branch feature/GEODE-3569 updated: GEODE-3569: add backward
compatibility for LuceneIndexCreationProfile
This is an automated email from the ASF dual-hosted git repository.
zhouxj pushed a commit to branch feature/GEODE-3569
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-3569 by this push:
new 20f3a79 GEODE-3569: add backward compatibility for LuceneIndexCreationProfile
20f3a79 is described below
commit 20f3a7941f7803b663a77fce6bd1402fe4043834
Author: zhouxh <gz...@pivotal.io>
AuthorDate: Wed Sep 20 23:34:11 2017 -0700
GEODE-3569: add backward compatibility for LuceneIndexCreationProfile
---
.../cache/lucene/internal/LuceneIndexCreationProfile.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexCreationProfile.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexCreationProfile.java
index e666cb2..e88045d 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexCreationProfile.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexCreationProfile.java
@@ -18,6 +18,8 @@ import org.apache.geode.DataSerializable;
import org.apache.geode.DataSerializer;
import org.apache.geode.cache.lucene.LuceneSerializer;
import org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
+import org.apache.geode.internal.Version;
+import org.apache.geode.internal.VersionedDataSerializable;
import org.apache.geode.internal.cache.CacheServiceProfile;
import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.lucene.analysis.Analyzer;
@@ -28,7 +30,7 @@ import java.io.DataOutput;
import java.io.IOException;
import java.util.*;
-public class LuceneIndexCreationProfile implements CacheServiceProfile, DataSerializable {
+public class LuceneIndexCreationProfile implements CacheServiceProfile, VersionedDataSerializable {
private String indexName;
@@ -179,7 +181,7 @@ public class LuceneIndexCreationProfile implements CacheServiceProfile, DataSeri
this.serializerClass = DataSerializer.readString(in);
}
- private void fromDataPre_GEODE_1_3_0_0(DataInput in) throws IOException, ClassNotFoundException {
+ public void fromDataPre_GEODE_1_3_0_0(DataInput in) throws IOException, ClassNotFoundException {
this.indexName = DataSerializer.readString(in);
this.regionPath = DataSerializer.readString(in);
this.fieldNames = DataSerializer.readStringArray(in);
@@ -192,10 +194,15 @@ public class LuceneIndexCreationProfile implements CacheServiceProfile, DataSeri
.append(this.indexName).append("; regionPath=").append(this.regionPath)
.append("; fieldNames=").append(Arrays.toString(this.fieldNames)).append("; analyzerClass=")
.append(this.analyzerClass).append("; fieldAnalyzers=").append(this.fieldAnalyzers)
- .append("]").toString();
+ .append("; serializer=").append(this.serializerClass).append("]").toString();
}
public String getRegionPath() {
return this.regionPath;
}
+
+ @Override
+ public Version[] getSerializationVersions() {
+ return new Version[] {Version.GEODE_130};
+ }
}
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].