Posts

hadoop - Find port number where HDFS is listening -

hadoop - Find port number where HDFS is listening - i want access hdfs qualified names such : hadoop fs -ls hdfs://machine-name:8020/user i access hdfs with hadoop fs -ls /user however, writing test cases should work on different distributions(hdp, cloudera, mapr...etc) involves accessing hdfs files qualified names. i understand hdfs://machine-name:8020 defined in core-site.xml fs.default.name . seems different on different distributions. example, hdfs maprfs on mapr. ibm biginsights don't have core-site.xml in $hadoop_home/conf . there doesn't seem way hadoop tells me what's defined in fs.default.name it's command line options. how can value defined in fs.default.name reliably command line? the test running on namenode, machine name easy. getting port number(8020) bit difficult. tried lsof, netstat.. still couldn't find reliable way. following command available in apache hadoop 2.0 can used getting values hadoop configuration pro...

sql server - Not able to get SSAS specific performance counter categories with c# -

sql server - Not able to get SSAS specific performance counter categories with c# - i want retrieve performance counters of ssas service. can see these counters, distributed multiple categories in perfmon. have checked registry key , found these counters. not able retrieve these counters c#. here sample code snippet using- foreach (performancecountercategory pcc in performancecountercategory.getcategories()) { if (pcc.categoryname.startswith("msolap")) { console.writeline(pcc.categoryname); } } note in perfmon can see counter categories as msolap$marsh:connection msolap$marsh:locks msolap$marsh:memory etc. is possible see 2 different list of counters @ 2 places i.e in perfmon & in c# (performancecountercategory class) is there existing wmi class ssas can used retrieve these counters. ssas on 64bit environment installs 64bit counter's library so, if run code 32bit application or using 32bit version of windows perfmon...

multithreading - Thread not printing everything after notifyAll in java -

multithreading - Thread not printing everything after notifyAll in java - class lock implements runnable{ int i=0; public synchronized void run(){ for(i=0;i<10;i++){ if(thread.currentthread().getname().equals("t1") && == 5) {try { this.wait();} catch(interruptedexception ie){}} system.out.print(thread.currentthread().getname()+" "); if(thread.currentthread().getname().equals("t3") && == 9) this.notifyall(); } } } public class threadlock { public static void main(string[] args){ lock l = new lock(); thread t1 = new thread(l); thread t2 = new thread(l); thread t3 = new thread(l); t1.setname("t1"); t2.setname("t2"); t3.setname("t3"); t1.start(); t2.start(); t3.start(); } } output is: t1 t1 t1 t1 t1 t3 t3 t3 t3 t3 t3 t3 t3 t3 t3 t1 t2 t2 t2 t2 t2 t2 t2 t2 t2 t2 t1 not printing 10 times after calling notifyall method. ran man...

Locking a cell in vba excel -

Locking a cell in vba excel - i want lock cell in vba excel. read previous answers , used them. cell not lock.!!!! code: number = range("a1") if number < 5 cells(1, 1).locked = true else cells(1, 1).locked = false end if after subroutine runs cells(1,1) not protected. locked cell become protected when switch protection worksheet. need add cells(1, 1).worksheet.protect that makes locked cells protected (see example). p.s. default cells are locked excel-vba

vim - Display soft hyphens and narrow no-break space -

vim - Display soft hyphens and narrow no-break space - when text editing vim under konsole, i'd see characters, including notably soft hyphens ( &shy; ) , narrow no-break spaces ( &#8239; ). right see these characters when cursor on them, , otherwise after moved 1 place left, leads much confusion. instance, syntax highlighting see in vim: <p class="txt"><span>(«par bonheur...») </span></p> while real text ( _ means narrow no-break space here): <p class="txt"><span>(«_par bonheur..._»)</span></p> and, if seek set cursor on e , see is: <p class="txt"><span>(«par bon heur...») </span></p> with cursor on h , because column e appears h is. without syntax highlighting </span></p> part shoved left well. i don't know if font issue, vim issue, kde issue or what. i've tried available fonts in scheme , behave same. there solution? ...

android - java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction -

android - java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction - i created asynctask class in write part (onpreexecute , doinbackgrond methods): @override protected void onpreexecute() { // instantiate progressdialog , set style style_horizontal dialog = new progressdialog(context); dialog.setindeterminate(false); dialog.setmax(100); dialog.setprogressstyle(progressdialog.style_horizontal); dialog.setcancelable(false); dialog.settitle("update"); dialog.setmessage("download data. please wait..."); dialog.show(); super.onpreexecute(); } @override protected string doinbackground(string... urls) { int count = 0; int numusers = 0; db = new database(context); sqlitedatabase localdb = db.getwritabledatabase(); seek { jsonarray userjsonarray = connectandcreatejsonarray(urls[0]); numusers = userjsonarray.length(); localdb.begi...

ruby on rails - Ignoring created_at timestamp when working with a Datetime field object -

ruby on rails - Ignoring created_at timestamp when working with a Datetime field object - in ticketing app built using rails 4.1, there 2 datetime fields (booking_start_date , booking_end_date). utilize next code ensure availability of tickets , update status: def check_start_date if(self.booking_start_date >= datetime.now && datetime.now < self.booking_end_date) if(self.ticket_quantity.to_i > 0) self.status = 'open' else self.status = 'sold out' end elsif(datetime.now < self.booking_start_date) self.status = 'booking available soon' elsif(datetime.now >= self.booking_end_date) self.status = 'closed' end end often takes few minutes user fill ticket creation form. so, if user starts @ 10.30 (which auto populated in booking_start_date field) , takes till 10.35 create form, status of ticket stays empty. put, long booking_start_date atleast min...