{"id":1991,"date":"2012-12-14T00:06:27","date_gmt":"2012-12-14T05:06:27","guid":{"rendered":"http:\/\/hstore.cs.brown.edu\/?page_id=1991"},"modified":"2013-01-05T15:44:07","modified_gmt":"2013-01-05T20:44:07","slug":"markovupdate","status":"publish","type":"page","link":"https:\/\/hstore.cs.brown.edu\/documentation\/system-procedures\/markovupdate\/","title":{"rendered":"@MarkovUpdate"},"content":{"rendered":"
This system procedure will cause every HStoreSite in the cluster to recompute the probabilities of their transaction prediction models<\/a>. If the the save_to_file<\/tt> input parameter is set to true, then the procedure will write out the updated Markov models to a random file in the HStoreSite’s global.temp_dir<\/a>.<\/p>\n You can have the BenchmarkController invoke this procedure automatically after the warm-up period of a benchmark by passing in the markov.recompute_warmup<\/tt> parameter, or after the entire benchmark run by passing in the the markov.recompute_end<\/tt> parameter. This will automatically retrieve the written files and combine them into a single MarkovGraphsContainer<\/a> file that can then be loaded into the system.<\/p>\nInput Parameters<\/h3>\n
\n
\n Name<\/th>\n Type<\/th>\n Description<\/th>\n<\/tr>\n \n SAVE_TO_FILE<\/td>\n boolean<\/td>\n Whether the procedure should write out the update Markov models to a temporary file on disk.<\/td>\n<\/tr>\n<\/table>\n Return Values<\/h3>\n
\n
\n Name<\/th>\n Type<\/th>\n Description<\/th>\n<\/tr>\n \n SITE<\/td>\n Integer<\/td>\n The id of the site that recomputed its models.<\/td>\n<\/tr>\n \n PARTITION<\/td>\n Integer<\/td>\n The id of the partition that recomputed its models.<\/td>\n<\/tr>\n \n OUTPUTFILE<\/td>\n String<\/td>\n The path to file that the HStoreSite saved its updated Markov models for this partition. If save_to_file<\/tt> is false, then this field will be null.<\/td>\n<\/tr>\n \n ISGLOBAL<\/td>\n Integer<\/td>\n Whether or not the Markov models are global (i.e., they are not partitioned with a decision tree). (1 = TRUE, 0 = FALSE)<\/td>\n<\/tr>\n<\/table>\n Java Example<\/h3>\n\n
Client client =<\/span> ClientFactory.createClient<\/span>(<\/span>)<\/span>;<\/span>\nclient =<\/span> client.createConnection<\/span>(<\/span>hostname, port)<\/span>;<\/span>\nClientResponse cresponse =<\/span> client.callProcedure<\/span>(<\/span>"@MarkovUpdate"<\/span>, 1<\/span>)<\/span>;<\/span><\/pre><\/td><\/tr><\/table><\/div>\n\n
Command-Line Example<\/h3>\n\n
hstore><\/span> EXEC @<\/span>MarkovUpdate 1<\/span><\/pre><\/td><\/tr><\/table><\/div>\n\n