Posts

Showing posts from October, 2013

Microsoft Azure Performance

Place each data disk in a single storage account to improve IOPS. http://msmvps.com/blogs/nunogodinho/archive/2013/04/22/lessons-learned-taking-the-best-out-of-windows-azure-virtual-machines.aspx http://tk.azurewebsites.net/2012/06/18/windows-azure-iaas-performance-sql-and-iops/ http://blog.aditi.com/cloud/windows-azure-virtual-machines-lessons-learned/

Generically load enum mapping via properties file

  public static void main(String[] args) {     final Properties props = loadProperties("some.properties");     loadMap(props, SomeEnum.class, someMap, "some.properties");   }   public > void loadMap(final Properties props, Class enumType,       Map m, final String resourceName)   {     for (Object o: props.keySet())     {       String key = null;       String value = null;       try       {         key = (String) o;         value = (String) props.get(key);         m.put(key, Enum.valueOf(enumType, value));       }       catch (Exception ex)       {         log.error(String.format("Error loading %s key %s, value %s", resourceName, key, value), ex);       }     }   }   public Properties loadProperties(String resourceName)   {     Properties props = new Properties();     try (InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourceName))     {       props.load(is);       return props;     }     catc