Giter VIP home page Giter VIP logo

coherence-k8s-example's People

Contributors

thegridman avatar

Watchers

 avatar

Forkers

viju2008

coherence-k8s-example's Issues

Addition of Provision of Runtime Creation of Caches.

Hello

I started the older version of Student Storage Example and tried to go into one of the pods.

As per our functional Requirements we need Floating Caches also for storing java objects . Request to please add the same to this example.

I tried to create a new cache "newtest" and do a BULKPUT but it failed.

kubectl exec -it -n coherence-example student-storage-0 /coherence-operator/utils/runner console

Map (test): cache newtest

Cache Configuration: newtest
SchemeName: db-scheme
AutoStart: true
ServiceName: StorageService
ServiceDependencies
EventDispatcherThreadPriority: 10
ThreadPriority: 10
WorkerThreadsMax: 2147483647
WorkerThreadsMin: 1
WorkerPriority: 5
ActionPolicyBuilder
RulesArray (ArrayList of QuorumRule)
[0]
RuleElementName: distribution-quorum
RuleMask: 1
[1]
RuleElementName: restore-quorum
RuleMask: 2
[2]
RuleElementName: recover-quorum
RuleMask: 16
[3]
RuleElementName: read-quorum
RuleMask: 4
[4]
RuleElementName: write-quorum
RuleMask: 8
Backups: 1
DistributionAggressiveness: 20
DistributionSynchronized: true
Partitions: 257
BldrsPartitionListener
AssignmentStrategyBuilder
Strategy: simple
TransferThreshold: 524288
DepsPersistence
PersistenceBuilder: Mode: on-demand
Active Location: /root/coherence/active
Snapshot Location:/root/coherence/snapshots
Trash Location:/root/coherence/trash
Mode: on-demand
StrictPartitioning: true
BackingMapScheme
InnerScheme (ReadWriteBackingMapScheme)
CacheStoreScheme
CacheStoreBuilder (ClassScheme)
CustomBuilder
FactoryClassName: com.oracle.coherence.examples.storage.CacheStoreFactory
FactoryMethodName: createCacheStore
MethodParametersList (ResolvableParameterList of Value)
[0] : Value{newtest}
[1] : Value{null}
InternalScheme (LocalScheme)
UnitFactor: 1
ExprfRollbackCacheStoreFailures: true
WriteMaxBatchSize: 128

### Map (newtest): bulkput 10000 100 0 100
Sun Oct 04 12:37:04 GMT 2020: adding 10000 items (starting with #0) each 100 bytes ...
2020-10-04 12:37:04.936/127.286 Oracle Coherence CE 20.06.1 (thread=main, member=4):
com.tangosol.net.RequestIncompleteException: Partial failure
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.validatePartialResponse(PartitionedCache.CDB:56)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.putAll(PartitionedCache.CDB:123)
at com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1803)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.putAll(PartitionedCache.CDB:5)
at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
at com.tangosol.coherence.component.application.console.Coherence.doBulkPut(Coherence.CDB:118)
at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:211)
at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:41)
at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.tangosol.net.CacheFactory.main(CacheFactory.java:1058)
Caused by: Portable(com.tangosol.util.WrapperException): (Wrapped: Failed request execution for StorageService service on Member(Id=3, Timestamp=2020-10-04 12:25:25.779, Address=10.244.1.27:35339, MachineId=9682, Location=site:AP-MUMBAI-1-AD-1,rack:AP-MUMBAI-1-AD-1,machine:10.0.10.4,process:29,member:student-storage-0, Role=student-storage)) null
at com.tangosol.util.Base.ensureRuntimeException(Base.java:250)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:61)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onPartialCommit(PartitionedCache.CDB:7)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onPutAllRequest(PartitionedCache.CDB:122)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$PutAllRequest.run(PartitionedCache.CDB:1)
at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)
at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$DaemonPool$WrapperTask.run(Service.CDB:12)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService$DaemonPool$WrapperTask.run(PartitionedService.CDB:1)
at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:66)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:54)
at java.base/java.lang.Thread.run(Thread.java:834)
at
at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3625)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2896)
at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:386)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:1)
at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)
at com.tangosol.coherence.component.net.message.responseMessage.DistributedPartialResponse.read(DistributedPartialResponse.CDB:12)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$PartialValueResponse.read(PartitionedCache.CDB:4)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.deserializeMessage(Grid.CDB:25)
at com.tangosol.coherence.component.net.MessageHandler$Connection.prepareMessage(MessageHandler.CDB:52)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.TransportService$MessageHandler$Connection.prepareMessage(TransportService.CDB:3)
at com.tangosol.coherence.component.net.MessageHandler.processMessage(MessageHandler.CDB:31)
at com.tangosol.coherence.component.net.MessageHandler$EventCollector.add(MessageHandler.CDB:51)
at com.oracle.coherence.common.internal.net.socketbus.AbstractSocketBus.addEvent(AbstractSocketBus.java:857)
at com.oracle.coherence.common.internal.net.socketbus.SocketMessageBus$MessageConnection$ReadBatch.onReady(SocketMessageBus.java:803)
at com.oracle.coherence.common.internal.net.socketbus.SocketMessageBus$MessageConnection$ReadBatch.read(SocketMessageBus.java:645)
at com.oracle.coherence.common.internal.net.socketbus.SocketMessageBus$MessageConnection.processReads(SocketMessageBus.java:212)
at com.oracle.coherence.common.internal.net.socketbus.BufferedSocketBus$BufferedConnection.onReadySafe(BufferedSocketBus.java:706)
at com.oracle.coherence.common.internal.net.socketbus.AbstractSocketBus$Connection.onReady(AbstractSocketBus.java:2148)
at com.oracle.coherence.common.internal.net.RunnableSelectionService.process(RunnableSelectionService.java:407)
at com.oracle.coherence.common.internal.net.RunnableSelectionService.run(RunnableSelectionService.java:280)
at com.oracle.coherence.common.internal.net.ResumableSelectionService.run(ResumableSelectionService.java:139)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: Portable(java.lang.UnsupportedOperationException)
at java.base/java.util.AbstractMap.put(AbstractMap.java:209)
at java.base/java.util.AbstractMap.putAll(AbstractMap.java:281)
at com.tangosol.util.WrapperObservableMap.putAll(WrapperObservableMap.java:191)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.putAllPrimaryResource(PartitionedCache.CDB:7)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.postPutAll(PartitionedCache.CDB:27)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.putAll(PartitionedCache.CDB:28)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onPutAllRequest(PartitionedCache.CDB:99)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$PutAllRequest.run(PartitionedCache.CDB:1)
at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)
at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$DaemonPool$WrapperTask.run(Service.CDB:12)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService$DaemonPool$WrapperTask.run(PartitionedService.CDB:1)
at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:66)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:54)
at java.base/java.lang.Thread.run(Thread.java:834)
at
at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3625)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2896)
at com.tangosol.io.pof.PortableException.readExternal(PortableException.java:202)
at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:59)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3625)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2896)
at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:386)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:1)
at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)
at com.tangosol.coherence.component.net.message.responseMessage.DistributedPartialResponse.read(DistributedPartialResponse.CDB:12)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$PartialValueResponse.read(PartitionedCache.CDB:4)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.deserializeMessage(Grid.CDB:25)
at com.tangosol.coherence.component.net.MessageHandler$Connection.prepareMessage(MessageHandler.CDB:52)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.TransportService$MessageHandler$Connection.prepareMessage(TransportService.CDB:3)
at com.tangosol.coherence.component.net.MessageHandler.processMessage(MessageHandler.CDB:31)
at com.tangosol.coherence.component.net.MessageHandler$EventCollector.add(MessageHandler.CDB:51)
at com.oracle.coherence.common.internal.net.socketbus.AbstractSocketBus.addEvent(AbstractSocketBus.java:857)
at com.oracle.coherence.common.internal.net.socketbus.SocketMessageBus$MessageConnection$ReadBatch.onReady(SocketMessageBus.java:803)
at com.oracle.coherence.common.internal.net.socketbus.SocketMessageBus$MessageConnection$ReadBatch.read(SocketMessageBus.java:645)
at com.oracle.coherence.common.internal.net.socketbus.SocketMessageBus$MessageConnection.processReads(SocketMessageBus.java:212)
at com.oracle.coherence.common.internal.net.socketbus.BufferedSocketBus$BufferedConnection.onReadySafe(BufferedSocketBus.java:706)
at com.oracle.coherence.common.internal.net.socketbus.AbstractSocketBus$Connection.onReady(AbstractSocketBus.java:2148)
at com.oracle.coherence.common.internal.net.RunnableSelectionService.process(RunnableSelectionService.java:407)
at com.oracle.coherence.common.internal.net.RunnableSelectionService.run(RunnableSelectionService.java:280)
at com.oracle.coherence.common.internal.net.ResumableSelectionService.run(ResumableSelectionService.java:139)
at java.base/java.lang.Thread.run(Thread.java:834)

Map (newtest):
2020-10-04 12:37:25.638/147.987 Oracle Coherence CE 20.06.1 (thread=Cluster, member=4): Member(Id=2, Timestamp=2020-10-04 12:37:25.637, Address=10.244.0.40:38087, MachineId=9681, Location=site:AP-MUMBAI-1-AD-1,rack:AP-MUMBAI-1-AD-1,machine:10.0.10.3,process:30,member:student-storage-2, Role=student-storage) left Cluster with senior member 1
2020-10-04 12:37:25.639/147.988 Oracle Coherence CE 20.06.1 (thread=Invocation:Management, member=4): Member 2 left service Management with senior member 1
2020-10-04 12:37:25.640/147.989 Oracle Coherence CE 20.06.1 (thread=DistributedCache:StorageService, member=4): Member 2 left service StorageService with senior member 1

Map (newtest):
2020-10-04 12:37:25.651/148.000 Oracle Coherence CE 20.06.1 (thread=Transport:TransportService, member=4): Member 2 left service TransportService with senior member 1
2020-10-04 12:37:25.657/148.006 Oracle Coherence CE 20.06.1 (thread=Cluster, member=4): MemberLeft notification for Member(Id=2, Timestamp=2020-10-04 12:37:25.637, Address=10.244.0.40:38087, MachineId=9681, Location=site:AP-MUMBAI-1-AD-1,rack:AP-MUMBAI-1-AD-1,machine:10.0.10.3,process:30,member:student-storage-2, Role=student-storage) received from Member(Id=3, Timestamp=2020-10-04 12:25:25.779, Address=10.244.1.27:35339, MachineId=9682, Location=site:AP-MUMBAI-1-AD-1,rack:AP-MUMBAI-1-AD-1,machine:10.0.10.4,process:29,member:student-storage-0, Role=student-storage)

Issue in Readme.

Start the Student REST Service
The Coherence Operator will have create a K8s Service to expose the Extend proxy, this service will be called student-storage-extend. The DNS name created in Kubernetes for this will be student-storage-extend..svc where is the name of the namespace the storage cluster was created in. We can use this to set the extend.host System property when we run the REST service below. In this example we assume that the storage cluster is in a namespace called sbi so the Extend service name is student-storage-extend.sbi.svc.

To start the Spring Boot REST Service use the following yaml:

k8s/spring-storage-cluster.yaml

It seems it should be rest-service.yaml

Maven Build Failure after including Oracle Enterprise Coherence jar in pom.xml

Hello,

I added the Commercial version of coherence as per the URL i have provided in mail.

However the build process failed. The POM.XML and build output are below

### I am attaching the pom. xml


4.0.0

<parent>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>2.3.3.RELEASE</version>
	<relativePath/>
</parent>

<groupId>org.example</groupId>
<artifactId>spring-boot-storage-service</artifactId>
<version>1.0.0-SNAPSHOT</version>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>

    <version.lib.coherence>14.1.1.0.0</version.lib.coherence>
    <version.lib.hamcrest>1.3</version.lib.hamcrest>
    <version.lib.junit>5.6.1</version.lib.junit>
    <version.lib.mockito>3.3.3</version.lib.mockito>
    <version.lib.opentracing>0.33.0</version.lib.opentracing>
    <version.lib.opentracing.tracerresolver>0.1.8</version.lib.opentracing.tracerresolver>
    <version.lib.oracledb>19.7.0.0</version.lib.oracledb>

    <version.plugin.failsafe>2.22.2</version.plugin.failsafe>
    <version.plugin.jib>2.5.2</version.plugin.jib>
    <version.plugin.surefire>2.22.2</version.plugin.surefire>
</properties>

<dependencies>
    <!-- Dependency on the domain classes project -->
    <dependency>
        <groupId>com.oracle.coherence.examples</groupId>
        <artifactId>domain-model</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </dependency>

    <!-- Coherence dependencies -->
    <dependency>
        <groupId>com.oracle.coherence</groupId>
        <artifactId>coherence</artifactId>
        <version>${version.lib.coherence}</version>
    </dependency>
    <dependency>
        <groupId>com.oracle.coherence</groupId>
        <artifactId>coherence-management</artifactId>
        <version>${version.lib.coherence}</version>
    </dependency>
    <dependency>
        <groupId>com.oracle.coherence</groupId>
        <artifactId>coherence-metrics</artifactId>
        <version>${version.lib.coherence}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>

    <!-- Oracle JDBC Driver -->
    <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ojdbc10</artifactId>
        <version>${version.lib.oracledb}</version>
    </dependency>

    <dependency>
        <groupId>io.opentracing</groupId>
        <artifactId>opentracing-api</artifactId>
        <version>${version.lib.opentracing}</version>
    </dependency>
    <dependency>
        <groupId>io.opentracing</groupId>
        <artifactId>opentracing-noop</artifactId>
        <version>${version.lib.opentracing}</version>
    </dependency>
    <dependency>
        <groupId>io.opentracing</groupId>
        <artifactId>opentracing-util</artifactId>
        <version>${version.lib.opentracing}</version>
    </dependency>
    <dependency>
        <groupId>io.opentracing.contrib</groupId>
        <artifactId>opentracing-tracerresolver</artifactId>
        <version>${version.lib.opentracing.tracerresolver}</version>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>${version.lib.hamcrest}</version>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${version.lib.mockito}</version>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${version.lib.junit}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${version.lib.junit}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${version.lib.junit}</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <!-- Surefire plugin to run unit tests -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.plugin.surefire}</version>
            <configuration>
                <reuseForks>false</reuseForks>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-engine</artifactId>
                    <version>5.6.1</version>
                </dependency>
                <dependency>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                    <version>5.6.1</version>
                </dependency>
            </dependencies>
        </plugin>

        <!-- Failsafe plugin to run integration tests -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${version.plugin.failsafe}</version>
            <configuration>
                <reuseForks>false</reuseForks>
                <systemProperties>
                    <oracle.db.url>jdbc:oracle:thin:@localhost:1521/ORCLPDB1</oracle.db.url>
                    <oracle.db.user>jonathan</oracle.db.user>
                    <oracle.db.pwd>secret</oracle.db.pwd>
                </systemProperties>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-engine</artifactId>
                    <version>5.6.1</version>
                </dependency>
                <dependency>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                    <version>5.6.1</version>
                </dependency>
            </dependencies>
        </plugin>

        <!-- JIB plugin to build the OCI image -->
        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>jib-maven-plugin</artifactId>
            <version>${version.plugin.jib}</version>
            <executions>
                <execution>
                    <goals>
                        <goal>dockerBuild</goal>
                    </goals>
                    <phase>package</phase>
                    <configuration>
                        <from>
                            <image>docker://gcr.io/distroless/java:11</image>
                        </from>
                        <to>
                            <image>coherence-example-spring-storage:${project.version}</image>
                        </to>
                        <container>
                            <mainClass>com.oracle.coherence.examples.storage.StorageApplication</mainClass>
                            <environment>
                                <!-- Setting the COH_MAIN_CLASS environment variable will make the Coherence K8s Operator use
                                     the correct main class without needing to specify it the class name in the Coherence
                                     resource yaml -->
                                <COH_MAIN_CLASS>com.oracle.coherence.examples.storage.StorageApplication</COH_MAIN_CLASS>
                                <!-- Jaeger tracing variables -->
                                <JAEGER_SAMPLER_TYPE>const</JAEGER_SAMPLER_TYPE>
                                <JAEGER_SAMPLER_PARAM>1</JAEGER_SAMPLER_PARAM>
                                <JAEGER_SERVICE_NAME>coherence</JAEGER_SERVICE_NAME>
                            </environment>
                            <jvmFlags>
                                <jvmFlag>-Dcoherence.log=jdk</jvmFlag>
                                <jvmFlag>-Dcoherence.metrics.http.enabled=true</jvmFlag>
                                <jvmFlag>-Dcoherence.metrics.http.port=9612</jvmFlag>
                                <jvmFlag>-Dcoherence.management.http=all</jvmFlag>
                                <jvmFlag>-Dcoherence.management.http.port=30000</jvmFlag>
                                <jvmFlag>-Dcoherence.extend.port=20000</jvmFlag>
                                <jvmFlag>-Dcoherence.ttl=0</jvmFlag>
                                <jvmFlag>-Dcoherence.tracing.ratio=1</jvmFlag>
                            </jvmFlags>
                            <ports>
                                <port>9612</port>
                                <port>30000</port>
                                <port>20000</port>
                            </ports>
                        </container>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

### The build output is below

ubuntu@master-node:/home/ubuntu4$ ./mvnw clean install -DskipTests -f spring-boot-storage-service/
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< org.example:spring-boot-storage-service >---------------
[INFO] Building spring-boot-storage-service 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ spring-boot-storage-service ---
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ spring-boot-storage-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ spring-boot-storage-service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /home/ubuntu4/spring-boot-storage-service/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/ubuntu4/spring-boot-storage-service/src/main/java/com/oracle/coherence/examples/storage/StudentCacheStore.java:[15,8] com.oracle.coherence.examples.storage.StudentCacheStore is not abstract and does not override abstract method eraseAll(java.util.Collection<? extends com.oracle.coherence.examples.domain.StudentId>) in com.tangosol.net.cache.CacheStore
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.556 s
[INFO] Finished at: 2020-09-20T11:31:01Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project spring-boot-storage-service: Compilation failure
[ERROR] /home/ubuntu4/spring-boot-storage-service/src/main/java/com/oracle/coherence/examples/storage/StudentCacheStore.java:[15,8] com.oracle.coherence.examples.storage.StudentCacheStore is not abstract and does not override abstract method eraseAll(java.util.Collection<? extends com.oracle.coherence.examples.domain.StudentId>) in com.tangosol.net.cache.CacheStore
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException[](url)

Issue in Readme

The yaml above is in the ./k8s/storage-cluster.yaml[] file. Create the storage cluster with the following command:

kubectl create -f ./k8s/spring-storage-cluster.yaml

Seems the sentence should be ./k8s/spring-storage-cluster.yaml

PODS Not showing up after kubectl apply

PODS not showing up after applying this: The METADATA NAME HAS BEEN CHANGED BY ME to "student-storage-new"

ubuntu@acsokecluster2:~/jo_example2/k8s$ cat storage-cluster.yaml
apiVersion: coherence.oracle.com/v1
kind: Coherence
metadata:
name: student-storage-new
spec:
annotations:
openshift.io/scc: anyuid
image: vijaypan/storage-service-st:1.0.0-SNAPSHOT
application:
type: spring
env:

  • name: ORACLE_DB_HOST
    value: 140.238.229.132
  • name: ORACLE_DB_PORT
    value: '1521'
  • name: ORACLE_DB_SID
    value: ORCLPDB1
  • name: ORACLE_DB_USER
    value: College
  • name: ORACLE_DB_PASSWORD
    value: Coherence2020
    coherence:
    metrics:
    enabled: true
    management:
    enabled: true
    ports:
    • name: metrics
      port: 9612
      serviceMonitor:
      enabled: true
    • name: management
      port: 30000
    • name: extend
      port: 20000
      readinessProbe:
      initialDelaySeconds: 10
      periodSeconds: 10

NAME READY STATUS RESTARTS AGE
coherence-operator-controller-manager-7dd6cb9b4f-jql2p 1/1 Running 1 47m
example-cluster-proxy-0 1/1 Running 1 8d
example-cluster-rest-0 1/1 Running 1 8d
example-cluster-storage-0 1/1 Running 1 8d
example-cluster-storage-1 1/1 Running 1 8d
example-cluster-storage-2 1/1 Running 1 8d
prometheus-grafana-595879d678-pz4hm 2/2 Running 0 4d19h
prometheus-kube-state-metrics-7c64748dd4-fjlrk 1/1 Running 0 4d19h
prometheus-prometheus-node-exporter-kt9d2 1/1 Running 0 4d19h
prometheus-prometheus-node-exporter-rnmx6 1/1 Running 0 4d19h
prometheus-prometheus-node-exporter-x9qzs 1/1 Running 0 4d19h
prometheus-prometheus-oper-operator-5769f8864c-wpjfx 2/2 Running 0 4d19h
prometheus-prometheus-prometheus-oper-prometheus-0 3/3 Running 1 4d19h
student-storage-0 1/1 Running 0 5d21h
student-storage-1 1/1 Running 0 5d21h
students-application-546548d64-frtjm 1/1 Running 0 5d21h
students-application-new-b647d58fc-jnw87 1/1 Running 0 12m
test-cluster-0 1/1 Running 0 4d19h
test-cluster-1 1/1 Running 0 4d19h

kubectl apply -f storage-cluster.yaml -n coherence-test
coherence.coherence.oracle.com/student-storage-new unchanged

Java Path issue running on Kubernetes

I ran the storage-service yaml on Oracle OKE and it gave the following Error.
I am not sure why it is checking for Coherence 12.2.1.4.0

kubectl logs student-storage-1 -n coherence-demo-ns

INFO: Command: java java -cp /coherence-operator/utils/lib/:/app/resources:/app/classes:/app/classpath/:/app/libs/*:/coherence-operator/utils/lib/coherence-utils.jar:/coherence-operator/utils/config com.oracle.coherence.k8s.CoherenceVersion 12.2.1.4.0
ERROR: Coherence version check failed exec: "java": executable file not found in $PATH
ERROR: exec: "java": executable file not found in $PATH

ubuntu@acsokecluster2:~/cohexample$ kubectl get pods -n coherence-demo-ns
NAME READY STATUS RESTARTS AGE
coherence-operator-5cdbd78888-vnn7h 1/1 Running 0 32m
student-storage-0 0/1 CrashLoopBackOff 8 20m
student-storage-1 0/1 CrashLoopBackOff 8 20m
student-storage-2 0/1 Error 5 3m53s
students-application-59bd8d6577-8j94m 1/1 Running 0 14m

When i run using Docker commands it works

Request for example with JPAcacheLoader and JpaCacheStore

Please provide us an example of spring-boot-example-storage with JPACacheLoader JpaCacheStore and entity JPA for Custom image to database table mapping. We are not using TopLink

Can both the Jcache and JPAcacheloader mixed in the same example.

Have messaged you in slack the requirement.

This example as i understood use Jcache. Please correct me if i am wrong as i am new to coherence

student-pof-config Course ID missing

Hello Jonathan,

I was going through the code as i am unable to deploy operator 3.1.0

Isn't Reference to Course class also required in student-pof-config.xml ??

Addition of Method for Pre-loading Elements to the Cache

Hello,

Please add method for pre-loading the cache through Coherence.

When container starts we need to pre-load all data that is available in the database for Student Table.
Load all students in the database table into the cache.

We do not want to go by the side-car microservice method i.e. another microservice pre-loading the cache because that adds additional complexity into the system and we do not want it to be that way.

On startup of the grid cache the preload method for the Student Table needs to be called.

Addition of Reload cache api

Hello,

Please add a Reload API which reloads all values in Student Class.

We could use Coherence APIs (if available) for reloading the cache or a REST API inside the grid cache in Spring which could find all the classes where there is a mapping with the database and reload them for us.

May be by first call the eraseAll() methods for all classes and then using the preload methods

I am not sure which is the best method . Please provide the same.

We will build a button in the Administration frontend of our Application which will invoke the Reload Operation once and Grid cache takes the call and does the rest for all caches mapped to database tables.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.