OS X 10.10.1 /etc/hosts & /private/etc/hosts file is being ignored and not resolving
/private/etc/hosts seems to be working normally for me in Yosemite (version 10.10.1). It's not necessary to flush the cache or reset discoveryd (the DNS resolver in Yosemite); sudo fs_usage | grep private/etc/hosts shows discoveryd reading the file immediately after I save changes to it.

[Update: discoveryd was only used in OS X versions 10.10.0 - 10.10.3. In both earlier and later versions, mDNSResponder provides the same function... and also immediately notices changes in /etc/hosts.]

However, dig, nslookup, and host will not see entries in it because they bypass the system's resolver and do raw DNS lookups. They've always done this, so this is not new in Yosemite. The "official" way to do a lookup through the system resolver in OS X is to use dscacheutil:

dscacheutil -q host -a name www.example.com


...but since that's painfully verbose, I tend to just use ping instead (and then look at the first line, where it lists what IP it's pinging). Starting in 10.9, you can also use Network Utility's Lookup tab (before that it used dig, and therefore bypassed the system lookup policy).

BTW, please pay no attention to the macrumors thread that Tetsujin linked; it's full of people who don't quite know what they're doing and are misunderstanding the results of their own mistakes.