Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » table created in the Hsql data base dropped after reboot
table created in the Hsql data base dropped after reboot [message #1750111] Fri, 16 December 2016 08:44 Go to next message
Sabrina anirbas is currently offline Sabrina anirbasFriend
Messages: 45
Registered: April 2015
Member
Hello,

I used the DbService to access to the kura HSQL db. Every thing looks good: table created, data inserted...

but when I reboot my Raspberry pi the created table disappeared.

what have I missed?

Thanks!
Best regards,
Sabrina
Re: table created in the Hsql data base dropped after reboot [message #1750174 is a reply to message #1750111] Fri, 16 December 2016 18:00 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

The HSQL database has different options for storing data: 1. In Memory 2. On Disk/In Memory 3. On Disk. The default behavior in Kura is to use option 1 as this is the fasted method for publishing data. If you need data to persist across reboot, you need to choose option 2 or 3. This is controlled by the kura.properties file located at /opt/eclipse/kura/kura/kura.properties. Simply comment/uncomment what you need and restart Kura. You should read the impact of changing these settings before making your decision [1].

[1] https://github.com/eclipse/kura/blob/develop/kura/distrib/src/main/resources/raspberry-pi-2/kura.properties

Thanks,
--Dave
Re: table created in the Hsql data base dropped after reboot [message #1750251 is a reply to message #1750174] Mon, 19 December 2016 10:31 Go to previous messageGo to next message
Sabrina anirbas is currently offline Sabrina anirbasFriend
Messages: 45
Registered: April 2015
Member
Hello,

Great, I see thanks!
So if I chose the second option, the ESF Housekeeper task will flash the data periodically, what is the period of data storing? 5 min? as mentionned in https://github.com/eclipse/kura/blob/94f7b78a16adfda3354a8b7eeeb2fba578a392ef/kura/org.eclipse.kura.core/OSGI-INF/metatype/org.eclipse.kura.data.DataService.xml

Thanks!
Sabrina
Re: table created in the Hsql data base dropped after reboot [message #1750329 is a reply to message #1750251] Tue, 20 December 2016 02:04 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Sabrina,

Yes, the housekeeper is what you are looking for. I believe the default value is 900s (15 minutes), but this is adjustable.

Thanks,
--Dave
Re: table created in the Hsql data base dropped after reboot [message #1750340 is a reply to message #1750329] Tue, 20 December 2016 08:03 Go to previous messageGo to next message
Sabrina anirbas is currently offline Sabrina anirbasFriend
Messages: 45
Registered: April 2015
Member
ah okey thanks I thought it is 5 min when I saw the description:

   <AD id="store.housekeeper-interval"
            name="store.housekeeper-interval"
            type="Integer"
            cardinality="0"
            required="true"
            default="900"
            min="5"
            description="Interval in seconds used to run the Data Store housekeeper task (min 5)."/>


Best,
Sabrina
Re: table created in the Hsql data base dropped after reboot [message #1750513 is a reply to message #1750340] Wed, 21 December 2016 23:44 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

Those times are in seconds. The default is 900 seconds, with a minimum of 5 seconds.

Thanks,
--Dave
Re: table created in the Hsql data base dropped after reboot [message #1783911 is a reply to message #1750513] Tue, 20 March 2018 10:05 Go to previous message
Ahmad Arif is currently offline Ahmad ArifFriend
Messages: 10
Registered: February 2018
Junior Member
Hi Sabrina,

Can you please guide me how to use DbService to access HSQL db. I am working on an IoT device I want to create a table and store data in the database.

Thanks!
Regards,
Ahmad Arif
Previous Topic:Logfile per bundle
Next Topic:DataPublisherService not connected
Goto Forum:
  


Current Time: Fri Dec 13 16:46:28 GMT 2024

Powered by FUDForum. Page generated in 0.04460 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top